Skip to content

[Bug]: Animation changing the azimuth only of scatter plot requires mouse click to draw #22598

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

Closed
dani0805 opened this issue Mar 4, 2022 · 1 comment

Comments

@dani0805
Copy link

dani0805 commented Mar 4, 2022

Bug summary

When animating a scatter changing only the azimuth the plot will not be updated unless the mouse is clicked on the plot.
Might be platform specific on a apple silicon version 3.5.1

Code for reproduction

import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation

data = [np.random.random_sample((300, 3)) for _ in range(10)]
x, y, z = data[0][:, 0], data[0][:, 1], data[0][:, 2]


def update_pov(num):
    ax.view_init(elev=10., azim=num % 360)
    
    return graph,


fig = plt.figure(figsize=(5, 5))
ax = fig.add_subplot(111, projection="3d")
graph = ax.scatter(x, y, z, color='orange')

ax.set_xlim3d(0, 1)
ax.set_ylim3d(0, 1)
ax.set_zlim3d(0, 1)

ani = animation.FuncAnimation(fig, update_pov, frames=200, interval=50, blit=False)
plt.show()

Actual outcome

https://youtu.be/3l7gMHrwkqQ
in the video it is only animating when I click on the mousepad

Expected outcome

animations should flow independently of mouse clicks

Additional information

No response

Operating system

MacOS on Apple silicon

Matplotlib Version

3.5.1

Matplotlib Backend

MacOSX

Python version

Python 3.9.2

Jupyter version

No response

Installation

pip

@oscargus oscargus changed the title [Bug]: [Bug]: Animation changing the azimuth only of scatter plot require mouse click to draw Mar 4, 2022
@oscargus oscargus changed the title [Bug]: Animation changing the azimuth only of scatter plot require mouse click to draw [Bug]: Animation changing the azimuth only of scatter plot requires mouse click to draw Mar 4, 2022
@greglucas
Copy link
Contributor

I'm going to close this as a duplicate of #10980, as it is demonstrating the same issue of not updating automatically.

#21790 fixes both of these issues for macosx, although I'm not able to test on Apple Silicon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants