You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See joferkington/mpldatacursor#36.
Briefly, Line2D.contains currently assumes that points in the line are connected by straight segments, thus ignoring drawstyle. Minimal example (edited from the event handling doc):
I think the solution is to pass the array of actually drawn points into the path handling instead of the data points. The Line2D code is a bit hairy so I have not guess how hard that would actually be.
anntzer
added a commit
to anntzer/matplotlib
that referenced
this issue
May 29, 2016
For stepping drawstyles, `Line2D.draw` used to recompute a path at
drawing time, because its `_path` attribute always assumed a linear
drawstyle. Instead, directly compute the correct path.
Also fixesmatplotlib#6447 (`Line2D.contains` did not take drawstyle into account)
because that code relied on proximity of the mouse event with the
underlying path.
See joferkington/mpldatacursor#36.
Briefly,
Line2D.contains
currently assumes that points in the line are connected by straight segments, thus ignoringdrawstyle
. Minimal example (edited from the event handling doc):Clicking on the drawn line does not always trigger an event. Clicking on the not-drawn "straight" segments connecting the data points does.
The text was updated successfully, but these errors were encountered: