Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Fix containment and subslice optim. for steps.#6645
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -479,6 +479,8 @@ def contains(self, mouseevent): | ||
else: | ||
# If line, return the nearby segment(s) | ||
ind = segment_hits(mouseevent.x, mouseevent.y, xt, yt, pixels) | ||
if self._drawstyle.startswith("steps"): | ||
ind //= 2 | ||
ind += self.ind_offset | ||
@@ -680,7 +682,8 @@ def recache(self, always=False): | ||
else: | ||
interpolation_steps = 1 | ||
xy = STEP_LOOKUP_MAP[self._drawstyle](*self._xy.T) | ||
self._path = Path(np.asarray(xy).T, | ||
_interpolation_steps=interpolation_steps) | ||
self._transformed_path = None | ||
self._invalidx = False | ||
self._invalidy = False | ||
@@ -693,8 +696,9 @@ def _transform_path(self, subslice=None): | ||
""" | ||
# Masked arrays are now handled by the Path class itself | ||
if subslice is not None: | ||
xy = STEP_LOOKUP_MAP[self._drawstyle](*self._xy[subslice, :].T) | ||
_path = Path(np.asarray(xy).T, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Can you add a test image for this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. done | ||
_interpolation_steps=self._path._interpolation_steps) | ||
else: | ||
_path = self._path | ||
self._transformed_path = TransformedPath(_path, self.get_transform()) | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -4460,12 +4460,6 @@ def test_ls_ds_conflict(): | ||
linestyle='steps-pre:', drawstyle='steps-post') | ||
@image_comparison(baseline_images=['date_timezone_x'], extensions=['png']) | ||
def test_date_timezone_x(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. why remove this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It is duplicated (see the lines just above). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Ah, that is a good reason to remove it. | ||
# Tests issue 5575 | ||