Mercurial > hg > octave-terminal
changeset 10530:114376c7cba5
__actual_axis_position__.m: Fix bug when restoring figure position property to its original value.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sat, 17 Apr 2010 20:37:51 -0400 |
parents | 7147078550fe |
children | 2dd8ea8bfd71 |
files | scripts/ChangeLog scripts/plot/private/__actual_axis_position__.m |
diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-04-17 Ben Abbott <bpabbott@mac.com> + + * plot/private/__actual_axis_position__.m: Fix bug when restoring + figure position property to its original value. + 2010-04-16 David Bateman <dbateman@free.fr> * plot/__go_draw_figure__.m: Pass bg_is_set to __go_draw_axes__. Don't
--- a/scripts/plot/private/__actual_axis_position__.m +++ b/scripts/plot/private/__actual_axis_position__.m @@ -40,7 +40,7 @@ aspect_ratio_2d = axis_obj.plotboxaspectratio(1:2); endif orig_fig_units = get (axis_obj.parent, "units"); - orig_fig_position = get (axis_obj.parent, "units"); + orig_fig_position = get (axis_obj.parent, "position"); unwind_protect set (axis_obj.parent, "units", "pixels") fig_position = get (axis_obj.parent, "position"); @@ -58,7 +58,7 @@ pos = pos_in_pixels ./ fig_position([3, 4, 3, 4]); unwind_protect_cleanup set (axis_obj.parent, "units", orig_fig_units) - set (axis_obj.parent, "units", orig_fig_position) + set (axis_obj.parent, "position", orig_fig_position) end_unwind_protect endfunction