Skip to content

Commit 62ed34f

Browse files
committed
Fix eps + usetex combo.
1 parent a4378ef commit 62ed34f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/matplotlib/texmanager.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,11 @@ def make_tex(self, tex, fontsize):
208208
%s
209209
\pagestyle{empty}
210210
\begin{document}
211-
%% The empty hbox ensures that a page is printed even for empty inputs.
212-
\fontsize{%f}{%f}\hbox{}%s
211+
%% The empty hbox ensures that a page is printed even for empty inputs, except
212+
%% when using psfrag which gets confused by it.
213+
\fontsize{%f}{%f}%%
214+
\ifdefined\psfrag\else\hbox{}\fi%%
215+
%s
213216
\end{document}
214217
""" % (self._get_preamble(), fontsize, fontsize * 1.25, fontcmd % tex),
215218
encoding='utf-8')

0 commit comments

Comments
 (0)