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

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

[Octave-bug-tracker] [bug #49980] plotyy fails after previous plot


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #49980] plotyy fails after previous plot
Date: Fri, 6 Jan 2017 09:51:58 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #13, bug #49980 (project octave):

Now I see there is a much simpler alternative than the one I described in
comment #12. The way we generally use newplot is as follows (excerpt from
plot.m):


[hax, varargin, nargs] = __plt_get_axis_arg__ ("plot", varargin{:});

  if (nargs < 1)
    print_usage ();
  endif

  oldfig = [];
  if (! isempty (hax))
    oldfig = get (0, "currentfigure");
  endif
  unwind_protect
    hax = newplot (hax);


Which means we expect newplot to create the new axes/figure itself if it
doesn't already exist. The simple approach is thus if newplot created the
axes, then it knows it hasn't got to reset it. I attached a modified patch
that implements this approach.

Now there is still the case


close all
axes ()
plot (1:10)


In this case newplot will still reset already clean figure/axes but I think we
can live with it. Thoughts?

(file #39389)
    _______________________________________________________

Additional Item Attachment:

File name: rm_listeners4.patch            Size:4 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?49980>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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