8000 Bug Fix For "matplotlib eventplot not shows all the binary data for big number of events" - Draft PR by ebubekir-pulat · Pull Request #30053 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Bug Fix For "matplotlib eventplot not shows all the binary data for big number of events" - Draft PR #30053

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
9 changes: 9 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,15 @@
else:
positions = [np.asanyarray(positions)]

if 'snap' not in kwargs and len(positions) > 200:
_log.warning(

Check warning on line 1401 in lib/matplotlib/axes/_axes.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/axes/_axes.py#L1401

Added line #L1401 was not covered by tests
"eventplot: Number of events (%d) exceeds 200. Snapping has "
"been turned off. Snapping may still be turned on manually, "
"but runs the risk of 'missing' data in the outputted graph.",
len(positions))
kwargs['snap'] = False
kwargs['antialiaseds'] = True

Check warning on line 1407 in lib/matplotlib/axes/_axes.py

View check run for this annotation

Codecov / codecov/patch

lib/matplotlib/axes/_axes.py#L1406-L1407

Added lines #L1406 - L1407 were not covered by tests

poss = []
for position in positions:
poss += self._process_unit_info([("x", position)], kwargs)
Expand Down
Loading
0