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: Rik
Subject: [Octave-bug-tracker] [bug #49980] plotyy fails after previous plot
Date: Thu, 5 Jan 2017 18:24:44 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0

Update of bug #49980 (project octave):

                  Status:         Patch Submitted => In Progress            

    _______________________________________________________

Follow-up Comment #11:

I applied the first patch to stable after fixing the reject errors
(http://hg.savannah.gnu.org/hgweb/octave/rev/14f1738a56ae).  That takes care
of the regression in this bug report.

On the dev branch, I modified your patch slightly.  Instead of calling 


cla (ca, "reset")


from within newplot.m, I changed the code to directly issue the equivalent
commands


delete (allchild (ca));
reset (ca);


This is a performance enhancement because all of the first part of cla.m is
input validation and trying to determine which axes to act on before issuing
the above commands.  Since we already know the axes in question, there is a
significant time savings to just issue the commands.

Also, I added 


base_graphics_object::remove_all_listeners (void)
 {
+  std::cerr << "Executing remove_all_listeners\n";


just to see what is happening during plotting.


octave:1> close all
octave:2> plot (1:10)
Executing remove_all_listeners
Executing remove_all_listeners
Executing remove_all_listeners
Executing remove_all_listeners
Executing remove_all_listeners


So it seems that newplot.m needs to be altered to understand when a brand new
axes has been created (in which case values are already at defaults) and when
the axes of an existing plot is being modified.

@Pantxo: I'm uploading the latest version of the patch as rm_listeners3.cset
so you can start from there.


(file #39370)
    _______________________________________________________

Additional Item Attachment:

File name: rm_listener3.cset              Size:3 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]