Mercurial > hg > octave-nkf
changeset 9353:335dc62068a8
plotyy.m: Consider dataaspectratiomode before changing dataaspectratio.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 15 Jun 2009 11:21:53 -0400 |
parents | b59cc3252a51 |
children | 52bde0edd23a |
files | scripts/ChangeLog scripts/plot/plotyy.m |
diffstat | 2 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2009-06-15 Ben Abbott <bpabbott@mac.com> + + * plot/plotyy.m: Consider dataaspectratiomode before changing + dataaspectratio. + 2009-06-14 Ben Abbott <bpabbott@mac.com> * plot/plotyy.m: Fix compatibility with subplot, add listeners for
--- a/scripts/plot/plotyy.m +++ b/scripts/plot/plotyy.m @@ -237,15 +237,18 @@ position = get (h, "position"); view = get (h, "view"); dataaspectratio = get (h, "dataaspectratio"); + dataaspectratiomode = get (h, "dataaspectratiomode"); oldposition = get (ax2, "position"); oldview = get (ax2, "view"); olddataaspectratio = get (ax2, "dataaspectratio"); - if (! (isequal (position, oldposition) - && isequal (view, oldview) - && isequal (dataaspectratio, olddataaspectratio))) - set (ax2, "position", position, - "view", view, - "dataaspectratio", dataaspectratio); + olddataaspectratiomode = get (ax2, "dataaspectratiomode"); + if (! (isequal (position, oldposition) && isequal (view, oldview))) + set (ax2, "position", position, "view", view) + endif + if (! (isequal (dataaspectratio, olddataaspectratio) + && isequal (dataaspectratiomode, olddataaspectratiomode))) + set (ax2, "dataaspectratio", dataaspectratio); + set (ax2, "dataaspectratiomode", dataaspectratiomode); endif unwind_protect_cleanup recursion = false;