8000 [Bug]: Subsequent scatter plots work incorrectly · Issue #22470 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
[Bug]: Subsequent scatter plots work incorrectly #22470
Closed
@nakhodnov17

Description

@nakhodnov17

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0