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

Skip to content

Commit 5756b34

Browse files
committed
fixed a tex cache agg key bug
svn path=/trunk/matplotlib/; revision=1629
1 parent f3609c9 commit 5756b34

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/matplotlib/backends/backend_agg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ def draw_tex(self, gc, x, y, s, prop, angle):
265265
w,h = h,w
266266
x -= w
267267

268-
key = s, size, dpi, rgb
268+
key = s, size, dpi, rgb, angle
269269
im = self.texd.get(key)
270270

271271
if im is None:

lib/matplotlib/backends/backend_ps.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,12 @@ def print_figure(self, outfile, dpi=72,
10831083
latexh.close()
10841084

10851085
command = 'latex -interaction=nonstopmode "%s"' % texfile
1086+
verbose.report(command, 'debug-annoying')
10861087
stdin, stdout, stderr = os.popen3(command)
10871088
verbose.report(stdout.read(), 'debug-annoying')
10881089
verbose.report(stderr.read(), 'helpful')
10891090
command = 'dvips -R -T %fin,%fin -o "%s" "%s"' % (pw, ph, psfile, dvifile)
1091+
verbose.report(command, 'debug-annoying')
10901092
stdin, stdout, stderr = os.popen3(command)
10911093
verbose.report(stdout.read(), 'debug-annoying')
10921094
verbose.report(stderr.read(), 'helpful')
@@ -1096,6 +1098,7 @@ def print_figure(self, outfile, dpi=72,
10961098
command = 'gs -dBATCH -dNOPAUSE -dSAFER -r%d \
10971099
-sDEVICE=epswrite -dLanguageLevel=2 -dEPSFitPage \
10981100
-sOutputFile="%s" "%s"'% (dpi, epsfile, psfile)
1101+
verbose.report(command, 'debug-annoying')
10991102
stdin, stdout, stderr = os.popen3(command)
11001103
verbose.report(stdout.read(), 'debug-annoying')
11011104
verbose.report(stderr.read(), 'helpful')
@@ -1113,6 +1116,7 @@ def print_figure(self, outfile, dpi=72,
11131116
command = 'eps2eps -dSAFER -r%d "%s" "%s"'% (dpi, outfile, tmpfile)
11141117
else:
11151118
command = 'ps2ps -dSAFER -r%d "%s" "%s"'% (dpi, outfile, tmpfile)
1119+
verbose.report(command, 'debug-annoying')
11161120
stdin, stdout, stderr = os.popen3(command)
11171121
verbose.report(stdout.read(), 'debug-annoying')
11181122
verbose.report(stderr.read(), 'helpful')

lib/matplotlib/texmanager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def make_dvi(self, tex, force=0):
114114

115115
if force or not os.path.exists(dvifile):
116116
command = self.get_tex_command(tex, fname)
117+
verbose.report(command, 'debug-annoying')
117118
stdin, stdout, stderr = os.popen3(command)
118119
verbose.report(stdout.read(), 'debug-annoying')
119120
err = stderr.read()
@@ -145,6 +146,7 @@ def make_png(self, tex, dpi, force=0):
145146

146147
# see get_rgba for a discussion of the background
147148
if force or not os.path.exists(pngfile):
149+
verbose.report(command, 'debug-annoying')
148150
stdin, stdout, stderr = os.popen3(command)
149151
verbose.report(stdout.read(), 'debug-annoying')
150152
err = stderr.read()
@@ -160,6 +162,7 @@ def make_ps(self, tex, dpi, force=0):
160162

161163
if not os.path.exists(psfile):
162164
command = 'dvips -q -E -D %d -o "%s" "%s"'% (dpi, psfile, dvifile)
165+
verbose.report(command, 'debug-annoying')
163166
stdin, stdout, stderr = os.popen3(command)
164167
verbose.report(stdout.read(), 'debug-annoying')
165168
err = stderr.read()

0 commit comments

Comments
 (0)