Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7399b7f

Browse files
author
ojeda-e
committed
Replaced maxdict by dict. Added draw_without_rendering in test.
1 parent5af1662 commit7399b7f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎lib/matplotlib/tests/test_text.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,12 +761,13 @@ def test_pdf_chars_beyond_bmp():
761761
deftest_cache_large_labels():
762762
"""Test to verify cache helps when ticks are too large"""
763763
times= []
764+
fig,_=plt.subplots()
764765
forpowinrange(1,5):
765766
labels= [iforiinrange(10**pow)]
766767
t0=time.perf_counter()
767-
plt.figure()
768768
plt.xticks(labels)
769769
plt.yticks(labels)
770+
fig.draw_without_rendering()
770771
times.append(time.perf_counter()-t0)
771772
asserttimes[-1]>times[0]
772773
asserttimes[-1]>times[-2]

‎lib/matplotlib/text.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def __init__(self,
157157
self._linespacing=linespacing
158158
self.set_rotation_mode(rotation_mode)
159159
self.update(kwargs)
160-
self._cached=cbook.maxdict(50)
160+
self._cached=dict()
161161

162162
defupdate(self,kwargs):
163163
# docstring inherited
@@ -182,7 +182,7 @@ def __getstate__(self):
182182

183183
def__setstate__(self,state):
184184
self.__dict__.update(state)
185-
self._cached=cbook.maxdict(50)
185+
self._cached=dict()
186186

187187
defcontains(self,mouseevent):
188188
"""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp