-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
axis('equal') in mplot3d plots causes duplicate z axis in the nbagg backend #4971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What backends does this happen on? |
nbagg (Bug title ;) I can't reproduce it with any of the GUI Backends that I have tried. |
Ha! Sorry I can't read. nbagg has two canvas instances that it swaps between (so that in can compute the diffs). I bet there is something sutble going on with draw order/it's draw_idle not being good enough at snarfing duplicate draws. I am thinking of putting the non-propagation of stale state past an already stale artist back in. Always propagating prevents a corner case annoyance in vanilla python repl where an error in drawing prevents auto-draw from working on that figure until it is manually kicked (via attn @mdehoon |
@tacaswell Which backend does not implement draw_idle correctly? |
I am seeing this bug also with the MacOSX backend and the tkagg backend; I haven't tried the other backends. |
Having issues with Qt, but I think those are sorted. I am not sure about nbagg. |
Just curious... what is special about mplot3d that would trigger this On Fri, Aug 21, 2015 at 9:27 AM, Thomas A Caswell notifications@github.com
|
It's totally possible that this can be triggered without mplot3d. That's just where I happened to spot it. I can't reproduce it with a regular scatter plot but there might be some other way. |
@tacaswell OK. If you notice any other implementation problems with draw_idle in any of the backends, I'd be happy to have a look. |
The issue seems to be that the z-axis is in the draw tree twice, once before things get updated and once after. It look mostly ok most of the time because they are getting over-drawn on top of each other. |
A possible clue on that... the ZAxis is basically implemented as a XAxis On Sat, Aug 22, 2015 at 4:52 PM, Thomas A Caswell notifications@github.com
|
When we moved `Axes.draw` to use `Axes.get_children` to get the initial list of artists to draw the zaxis was now in this list (where as it was not previously). The 3D axes use `_axison = False` as `Axes3D` manages the drawing of the axis objects (which must happen before any of the artists). In `Axes.draw` there is a special case to remove the x and y axis from the draw list if `not _axison`. This change is to add a `_get_axis_list` method to the `Axes` base class and override this in the `Axes3D`. This list is looped over to remove all of the `axis` objects that when the axises should not be shown. Closes matplotlib#4971
This is on current master I can't reproduce this using 1.4.3. I guess it relates to the stale auto redraw handling?
results in
Rotating the figure restores the correct axes. I can't reproduce it with QT5Agg or GTK3Agg
It seems like both the equal axis z and the original z axis are drawn on top of each other. It doesn't seem to happen in regular 2D plots.
The text was updated successfully, but these errors were encountered: