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 10 commits into
base: main
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,14 @@ def eventplot(self, positions, orientation='horizontal', lineoffsets=1,
else:
positions = [np.asanyarray(positions)]

if 'snap' not in kwargs:
_log.warning(
"eventplot: Snapping has been turned off. Snapping may still "
"be turned on manually, but runs the risk of 'missing' data "
"in the outputted graph.")
kwargs['snap'] = False
kwargs['antialiaseds'] = True

poss = []
for position in positions:
poss += self._process_unit_info([("x", position)], kwargs)
Expand Down
Binary file modified lib/matplotlib/tests/baseline_images/test_axes/eventplot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading