comparison src/graphics.cc @ 9347:3da821b161e9

imported patch ticklabel
author Michael Goffioul <michael.goffioul@gmail.com>
date Sun, 14 Jun 2009 22:49:54 +0100
parents c539ec5726e7
children 610bf90fce2a
comparison
equal deleted inserted replaced
9346:d50c3d8efe71 9347:3da821b161e9
3420 if (is_logscale) 3420 if (is_logscale)
3421 tmp_ticks (i) = std::pow (10., tmp_ticks (i)); 3421 tmp_ticks (i) = std::pow (10., tmp_ticks (i));
3422 } 3422 }
3423 3423
3424 ticks = tmp_ticks; 3424 ticks = tmp_ticks;
3425 }
3426
3427 void
3428 axes::properties::calc_ticklabels (const array_property& ticks,
3429 any_property& labels, bool logscale)
3430 {
3431 Matrix values = ticks.get ().matrix_value ();
3432 Cell c (values.dims ());
3433 std::ostringstream os;
3434
3435 for (int i = 0; i < values.numel (); i++)
3436 {
3437 os.str (std::string ());
3438 os << values(i);
3439 c(i) = os.str ();
3440 }
3441
3442 labels = c;
3425 } 3443 }
3426 3444
3427 static void 3445 static void
3428 get_children_limits (double& min_val, double& max_val, double& min_pos, 3446 get_children_limits (double& min_val, double& max_val, double& min_pos,
3429 const Matrix& kids, char limit_type) 3447 const Matrix& kids, char limit_type)