octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48718] plot command clobbers axis "position"


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #48718] plot command clobbers axis "position" property with "hold on"
Date: Wed, 17 Oct 2018 17:00:45 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

Follow-up Comment #12, bug #48718 (project octave):

Looks like I have found a much more economic solution: skipping sync_positions
calls that are triggered during update_axes_layout. See attached patch.

The advantage is that sync_position can no more use erroneous data to compute
the position, but it looks like recursive calls to update_axes_layout are also
eliminated:


octave:1> close all
octave:2> ylabel "y-axis";
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
octave:3> hold on
octave:4> pos1 = get (gca, "position")
pos1 =

   0.13000   0.11000   0.77500   0.81500

octave:5> plot((1:2), (1:2)*1e-4)
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
sync_position skipped
sync_position skipped
sync_position skipped
update_axes_layout OK
sync_position skipped
sync_position skipped
sync_position skipped
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
update_axes_layout OK
sync_position done
update_axes_layout OK
update_axes_layout OK
sync_position done
update_axes_layout OK
update_axes_layout OK
-verabtim-

(file #45228)
    _______________________________________________________

Additional Item Attachment:

File name: avoid_recurse_sync_position.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?48718>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]