소스 검색

Fixed bug: xkcd and usetex=True not allowed.

Hans Petter Langtangen 9 년 전
부모
커밋
24e420e840
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      pysketcher/MatplotlibDraw.py

+ 3 - 2
pysketcher/MatplotlibDraw.py

@@ -13,8 +13,6 @@ import os
 import matplotlib
 
 matplotlib.use('TkAgg')
-# Allow \boldsymbol{} etc in title, labels, etc
-matplotlib.rc('text', usetex=True)
 matplotlib.rcParams['text.latex.preamble'] = '\\usepackage{amsmath}'
 
 import matplotlib.pyplot as mpl
@@ -95,6 +93,9 @@ class MatplotlibDraw(object):
         self.mpl = mpl
         if xkcd:
             self.mpl.xkcd()
+        else:
+            # Allow \boldsymbol{} etc in title, labels, etc
+            matplotlib.rc('text', usetex=True)
 
         self.xmin, self.xmax, self.ymin, self.ymax = \
              float(xmin), float(xmax), float(ymin), float(ymax)