Mercurial > hg > octave-lyh
diff 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 |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -3424,6 +3424,24 @@ ticks = tmp_ticks; } +void +axes::properties::calc_ticklabels (const array_property& ticks, + any_property& labels, bool logscale) +{ + Matrix values = ticks.get ().matrix_value (); + Cell c (values.dims ()); + std::ostringstream os; + + for (int i = 0; i < values.numel (); i++) + { + os.str (std::string ()); + os << values(i); + c(i) = os.str (); + } + + labels = c; +} + static void get_children_limits (double& min_val, double& max_val, double& min_pos, const Matrix& kids, char limit_type)