Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Improve rendering when using multiple / large labels#21958
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
base:main
Are you sure you want to change the base?
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 |
---|---|---|
@@ -107,7 +107,6 @@ class Text(Artist): | ||
"""Handle storing and drawing of text in window or data coordinates.""" | ||
zorder = 3 | ||
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. Is this dict really a memory hog if it gets larger? Why not just set to a large number and move on? Just because we can make a double caching structure doesn't mean we should. Given that we have had very few complaints of this nature, my assumption is that most people are not hitting the 50-element limit, so bumping it to 5000 for the few people who need it doesn't seem like a terrible idea. Note that this largely catches users who have accidentally used categoricals and created thousands of ticks. I think, if anything, we should add logic in the categorical ticker that raises a warning of more than 100 ticks are being asked for. | ||
def __repr__(self): | ||
return "Text(%s, %s, %s)" % (self._x, self._y, repr(self._text)) | ||
@@ -158,6 +157,7 @@ def __init__(self, | ||
self._linespacing = linespacing | ||
self.set_rotation_mode(rotation_mode) | ||
self.update(kwargs) | ||
self._cached = dict() | ||
def update(self, kwargs): | ||
# docstring inherited | ||
@@ -177,6 +177,7 @@ def __getstate__(self): | ||
d = super().__getstate__() | ||
# remove the cached _renderer (if it exists) | ||
d['_renderer'] = None | ||
d['_cached'] = {} | ||
return d | ||
def contains(self, mouseevent): | ||