Everything goes well but when i try to clear the figure, the xaxis and yaxis
don't desappear, so that the next axis print over the previous ones.
ax.cla() clears the plot.
But ax.xaxis.cla() or ax.yaxis.cla() have no effect.
as far as i can see, this is for resetting the formatting and
clearing labels - it does have an effect here:
In [16]: ax.set_ylabel("foo")
Out[16]: <matplotlib.text.Text at 0xb25a44c>
In [17]: ax.yaxis.cla() #label is gone
And fig.clr() seems to lock the process : nothing deleted, nothing new
ploted.
Try this:
f.clf(keep_observers=False)
from the docstring: "Set *keep_observers* to True if, for example,
a gui widget is tracking the axes in the figure."
best,
···
--
Paul Ivanov
314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
Sorry, it doesn't work.
ax.set_ylabel("foo")
doesn't change anything (before "ax.yaxis.cla()").
And f.clf(keep_observers=False) still locks the process.
But maybe I used wrong terms. Here is the displays ; left before the
clearing ; right, after the clearing ; the plot is correctly renewed, but
the ticks labels are printed over the previous ones. http://old.nabble.com/file/p32060191/Capture-6.png Capture-6.png
Sorry, it doesn't work.
ax.set_ylabel("foo")
doesn't change anything (before "ax.yaxis.cla()").
And f.clf(keep_observers=False) still locks the process.
But maybe I used wrong terms. Here is the displays ; left before the
clearing ; right, after the clearing ; the plot is correctly renewed, but
the ticks labels are printed over the previous ones. http://old.nabble.com/file/p32060202/Capture-6.png
I'm having exactly the same problem. Did you find a solution?
The only thing that I have noted so far is that when I plot for the second
time (when the axes start overlapping) if I move the cursor inside the
canvas area, it flickers and then the plots are displayed correctly. But it
only happens the first time.
Now, if you put a toolbar
self.toolbar = NavigationToolbar2TkAgg( self.canvas, self.PlotsContainer )
and you use any of the functions, say the zoom, then the flickering occurs
every time you pass over the white plotting area. The axes are updated (old
ones are gone) but the flickering is annoying. Plus you have to pretend you
want to zoom or something.
Besides that, I have been unsuccessful trying to tackle the issue.
I'm having exactly the same problem. Did you find a solution?
Hello
I have exactly the same problem while embedding matplotlib in PyQT4 on OS X
with backend_qt4agg.
I think I have found a solution : do you use frameon=False in this line :
fig = Figure(figsize=(width, height), dpi=dpi, frameon=False)
I did, and went back to True ... and no more axes update problems !!!