Mercurial > hg > octave-lojdl
changeset 14322:45f5a5d5656f stable
disable zooming for logscale axes
* graphics.cc (axes::properties::zoom_about_point): Don't zoom if
axis scale property is "log".
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 03 Feb 2012 19:11:51 -0500 |
parents | a9a42d630bd5 |
children | ec99c8c185be a646cee995cf |
files | src/graphics.cc |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -6463,8 +6463,11 @@ double max_neg_y = -octave_Inf; get_children_limits (miny, maxy, min_pos_y, max_neg_y, kids, 'y'); - xlims = do_zoom (x, factor, xlims, xscale_is ("log")); - ylims = do_zoom (y, factor, ylims, yscale_is ("log")); + if (! xscale_is ("log")) + xlims = do_zoom (x, factor, xlims, xscale_is ("log")); + + if (! yscale_is ("log")) + ylims = do_zoom (y, factor, ylims, yscale_is ("log")); zoom (xlims, ylims, push_to_zoom_stack); }