| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -225,6 +225,7 @@ def __init__(self): | |
| self._path_effects = mpl.rcParams['path.effects'] | ||
| self._sticky_edges = _XYPair([], []) | ||
| self._in_layout = True | ||
| self._in_autoscale = False | ||
|
|
||
| def __getstate__(self): | ||
| d = self.__dict__.copy() | ||
| Expand Down Expand Up | @@ -903,6 +904,14 @@ def get_in_layout(self): | |
| """ | ||
| return self._in_layout | ||
|
|
||
| def _get_in_autoscale(self): | ||
| """ | ||
| Return whether the artist is included in autoscaling calculations. | ||
|
|
||
| E.g. `.axes.Axes.autoscale_view()`. | ||
| """ | ||
| return self._in_autoscale | ||
|
|
||
| def _fully_clipped_to_axes(self): | ||
| """ | ||
| Return a boolean flag, ``True`` if the artist is clipped to the Axes | ||
| Expand Down Expand Up | @@ -1132,6 +1141,17 @@ def set_in_layout(self, in_layout): | |
| """ | ||
| self._in_layout = in_layout | ||
|
|
||
| def _set_in_autoscale(self, b): | ||
| """ | ||
| Set if artist is to be included in autoscaling calculations, | ||
| E.g. `.axes.Axes.autoscale_view()`. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| b : bool | ||
| """ | ||
| self._in_autoscale = b | ||
|
Comment thread
Copy link
Copy Markdown
Member
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityTo be checked: Do we need to set the self._stale flag?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityI don’t think _set_in_autoscale should mark the artist as stale. The flag only affects whether the artist participates in future autoscaling; it doesn’t change the artist’s visual state or require a redraw on its own. In practice it’s set during add_*, before any drawing occurs, so marking it stale would be unnecessary.
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
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. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityOk, so the argument is that changing in_autoscale will not result in automatic recalculation of the limits. Accepted. Can you please add a sentence on this to the docstring.
Sorry, something went wrong.
All reactions
|
||
|
|
||
| def get_label(self): | ||
| """Return the label used for this artist in the legend.""" | ||
| return self._label | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.