Skip to content

[Bug]: Subsequent scatter plots work incorrectly #22470

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
nakhodnov17 opened this issue Feb 14, 2022 · 1 comment · Fixed by #22476
Closed

[Bug]: Subsequent scatter plots work incorrectly #22470

nakhodnov17 opened this issue Feb 14, 2022 · 1 comment · Fixed by #22476
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Milestone

Comments

@nakhodnov17
Copy link

Bug summary

Two subsequent scatter plots produce incorrect output when calling first scatter with [0], [0] argument. Other arguments for first scatter plot (eg. [1], [1]) seems to produce correct output.

Code for reproduction

import matplotlib
import matplotlib.pyplot as plt

plt.scatter([0], [0])
plt.scatter([3], [3])
plt.savefig(f'test_v{matplotlib.__version__}_{matplotlib.get_backend()}.jpg')

Actual outcome

test_v3 5 1_TkAgg

Expected outcome

test_v3 4 3_TkAgg

Additional information

I can reproduce this behaviour on Windows and Ubuntu for matplotlib versions >= 3.5.0 and for different backends.

Operating system

Ubuntu

Matplotlib Version

3.5.1

Matplotlib Backend

agg

Python version

Python 3.9.7

Jupyter version

No response

Installation

conda

@anntzer
Copy link
Contributor

anntzer commented Feb 15, 2022

I can confirm the problem; this bisects to 1f4708b (#20717).

@anntzer anntzer added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Feb 15, 2022
@tacaswell tacaswell added this to the v3.5.2 milestone Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants