Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 064bbcf

Browse files
committed
Hide the .cached member of Text so it doesn't get documented.
1 parent ccaac6e commit 064bbcf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/text.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class Text(Artist):
146146
"""
147147
zorder = 3
148148

149-
cached = maxdict(50)
149+
_cached = maxdict(50)
150150

151151
def __str__(self):
152152
return "Text(%g,%g,%s)" % (self._x, self._y, repr(self._text))
@@ -285,8 +285,8 @@ def _get_layout(self, renderer):
285285
of a rotated text when necessary.
286286
"""
287287
key = self.get_prop_tup()
288-
if key in self.cached:
289-
return self.cached[key]
288+
if key in self._cached:
289+
return self._cached[key]
290290

291291
horizLayout = []
292292

@@ -440,7 +440,7 @@ def get_text_width_height_descent(*kl, **kwargs):
440440
xs, ys = xys[:, 0], xys[:, 1]
441441

442442
ret = bbox, zip(lines, whs, xs, ys), descent
443-
self.cached[key] = ret
443+
self._cached[key] = ret
444444
return ret
445445

446446
def set_bbox(self, rectprops):

0 commit comments

Comments
 (0)