8000 [Bug]: Animation changing the azimuth only of scatter plot requires mouse click to draw · Issue #22598 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: Animation changing the azimuth only of scatter plot requires mouse click to draw #22598
Closed
@dani0805

Description

@dani0805

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0