Skip to content

Current versions cannot reproduce rotate_axes_3d_demo.py #10980

Closed

Description

@snownontrace

Bug report

Bug summary

Python 2.7.14
Mac OS X El Capitan, v10.11.6
Matplotlib v2.2.2 (same for v2.0.0)

I was trying to reproduce the rotating 3D plot from this example:
https://matplotlib.org/examples/mplot3d/rotate_axes3d_demo.html
(also copied below)

However, the plot displayed the initial view, got stuck, and then finished without any errors. I later found that if I use another computer with an old matplotlib version (v1.5.3), the code runs correctly. I used pip to install different versions of matplotlib.

Code for reproduction

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

# load some test data for demonstration and plot a wireframe
X, Y, Z = axes3d.get_test_data(0.1)
ax.plot_wireframe(X, Y, Z, rstride=5, cstride=5)

# rotate the axes and update
for angle in range(0, 360):
    ax.view_init(30, angle)
    plt.draw()
    plt.pause(.001)

Activity

  1. changed the title [-]Current versions cannot reproduce [/-] [+]Current versions cannot reproduce rotate_axes_3d_demo.py[/+] on Apr 7, 2018
  2. dstansby commented on Apr 7, 2018

    @dstansby
    Member

    I reckon this is an OSX backend bug; what result do you get from this:

    import matplotlib
    print(matplotlib.get_backend())

    EDIT: it works fine for me on OSX, but using Qt5Agg backend.

  3. snownontrace commented on Apr 7, 2018

    @snownontrace
    Author

    With both versions 1.5.3 and 2.2.2 I got "MacOSX"
    It appears that I need to install PyQt5 for using Qt5Agg -- will try it later. Thanks!

  4. added this to the v2.2.3 milestone on Apr 8, 2018
  5. modified the milestones: v2.2.3, v2.2.4 on Jul 30, 2018
  6. modified the milestones: v2.2.4, v2.2.5 on Feb 11, 2019
  7. modified the milestones: v2.2.5, v3.2.0, v3.2.1 on Oct 22, 2019
  8. modified the milestones: v3.2.1, v3.2.2 on Mar 13, 2020
  9. modified the milestones: v3.2.2, v3.4.0 on Jun 12, 2020
  10. modified the milestones: v3.4.0, v3.5.0 on Jan 27, 2021
  11. modified the milestones: v3.5.0, v3.6.0 on Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions