Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Line2D._path obeys drawstyle. #6497
Conversation
mdboom
added the
needs_review
label
May 29, 2016
tacaswell
added this to the
2.1 (next point release)
milestone
May 29, 2016
tacaswell
commented on an outdated diff
May 29, 2016
| drawStyles = {} | ||
| drawStyles.update(_drawStyles_l) | ||
| drawStyles.update(_drawStyles_s) | ||
| # Need a list ordered with long names first: | ||
| drawStyleKeys = (list(six.iterkeys(_drawStyles_l)) + | ||
| list(six.iterkeys(_drawStyles_s))) | ||
| + _drawstyle_conv = { | ||
| + 'default': lambda x, y: (x, y), | ||
| + 'steps': pts_to_prestep, |
tacaswell
Owner
|
|
What the input to I would keep the |
|
Like in this version? |
tacaswell
and 1 other
commented on an outdated diff
May 29, 2016
| 'post': pts_to_poststep, | ||
| 'mid': pts_to_midstep, | ||
| 'step-pre': pts_to_prestep, | ||
| 'step-post': pts_to_poststep, | ||
| - 'step-mid': pts_to_midstep} | ||
| + 'step-mid': pts_to_midstep, |
tacaswell
Owner
|
tacaswell
commented on the diff
May 29, 2016
| @@ -470,8 +470,7 @@ def contains(self, mouseevent): | ||
| # application has set the error flags such that an exception is raised | ||
| # on overflow, we temporarily set the appropriate error flags here and | ||
| # set them back when we are finished. | ||
| - olderrflags = np.seterr(all='ignore') | ||
| - try: | ||
| + with np.errstate(all='ignore'): |
tacaswell
Owner
|
|
|
tacaswell
merged commit a260058
into matplotlib:master
May 29, 2016
tacaswell
removed the
needs_review
label
May 29, 2016
anntzer
deleted the
anntzer:fix-line2d-contains-drawstyle branch
May 29, 2016
This was referenced May 30, 2016
anntzer
added a commit
to anntzer/matplotlib
that referenced
this pull request
Jun 26, 2016
|
|
anntzer |
13b4555
|
anntzer commentedMay 29, 2016
For stepping drawstyles,
Line2D.drawused to recompute a path at drawing time, because its_pathattribute always assumed a linear drawstyle. Instead, directly compute the correct path.Also fixes #6447 (
Line2D.containsdid not take drawstyle into account) because that code relied on proximity of the mouse event with the underlying path.Note that unfortunately, the drawstyle names remain inconsistent with those accepted by
fill_betweenandfill_betweenx, which (seem to be the only functions to) rely oncbook.STEP_LOOKUP_MAP. It may be a good opportunity to fix the discrepancy too...