Mercurial > hg > octave-lojdl
changeset 14312:1734c3a48f31 stable
disable panning for logscale axes
* graphics.cc (axes::properties::translate_view): Disable panning for
logscale axes.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 02 Feb 2012 11:34:11 -0500 |
parents | d4f37aa5d126 |
children | 7a7ce92cff56 99428221b4e1 |
files | src/graphics.cc |
diffstat | 1 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -6511,10 +6511,17 @@ double max_neg_y = -octave_Inf; get_children_limits (miny, maxy, min_pos_y, max_neg_y, kids, 'y'); - xlims (0) += delta_x; - xlims (1) += delta_x; - ylims (0) += delta_y; - ylims (1) += delta_y; + if (! xscale_is ("log")) + { + xlims (0) += delta_x; + xlims (1) += delta_x; + } + + if (! yscale_is ("log")) + { + ylims (0) += delta_y; + ylims (1) += delta_y; + } zoom (xlims, ylims, false); }