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

Skip to content

Commit 5c24f88

Browse files
committed
Merge pull request #4721 from tacaswell/cln_remove_unused_tex_cache
CLN: remove unused code path
2 parents 6ee9a4d + 9a3802a commit 5c24f88

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class RendererAgg(RendererBase):
8585
def __init__(self, width, height, dpi):
8686
if __debug__: verbose.report('RendererAgg.__init__', 'debug-annoying')
8787
RendererBase.__init__(self)
88-
self.texd = maxdict(50) # a cache of tex image rasters
8988

9089
self.dpi = dpi
9190
self.width = width
@@ -245,17 +244,14 @@ def get_text_width_height_descent(self, s, prop, ismath):
245244
d /= 64.0
246245
return w, h, d
247246

248-
249247
def draw_tex(self, gc, x, y, s, prop, angle, ismath='TeX!', mtext=None):
250248
# todo, handle props, angle, origins
251249
size = prop.get_size_in_points()
252250

253251
texmanager = self.get_texmanager()
254-
key = s, size, self.dpi, angle, texmanager.get_font_config()
255-
im = self.texd.get(key)
256-
if im is None:
257-
Z = texmanager.get_grey(s, size, self.dpi)
258-
Z = np.array(Z * 255.0, np.uint8)
252+
253+
Z = texmanager.get_grey(s, size, self.dpi)
254+
Z = np.array(Z * 255.0, np.uint8)
259255

260256
w, h, d = self.get_text_width_height_descent(s, prop, ismath)
261257
xd = d * np.sin(np.deg2rad(angle))

0 commit comments

Comments
 (0)