[opensuse-factory] problem with matplotlib and latex fonts
Hi, I have a python script with plt.rc('text', usetex=True) plt.rc('font', family='sans-serif') to get latex fonts in my figures. However, after an update on Tumbleweed during the last days, when I run the script in ipython2, I get white figures with nothing on it and the following error message: Traceback (most recent call last): File "/usr/lib64/python2.7/site-packages/matplotlib/backends/ backend_qt5agg.py", line 197, in __draw_idle_agg FigureCanvasAgg.draw(self) File "/usr/lib64/python2.7/site-packages/matplotlib/backends/ backend_agg.py", line 464, in draw self.figure.draw(self.renderer) File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/figure.py", line 1143, in draw renderer, self, dsu, self.suppressComposite) File "/usr/lib64/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/axes/_base.py", line 2409, in draw mimage._draw_list_compositing_images(renderer, self, dsu) File "/usr/lib64/python2.7/site-packages/matplotlib/image.py", line 139, in _draw_list_compositing_images a.draw(renderer) File "/usr/lib64/python2.7/site-packages/matplotlib/artist.py", line 63, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/lib64/python2.7/site-packages/matplotlib/axis.py", line 1138, in draw renderer) File "/usr/lib64/python2.7/site-packages/matplotlib/axis.py", line 1078, in _get_tick_bboxes extent = tick.label1.get_window_extent(renderer) File "/usr/lib64/python2.7/site-packages/matplotlib/text.py", line 967, in get_window_extent bbox, info, descent = self._get_layout(self._renderer) File "/usr/lib64/python2.7/site-packages/matplotlib/text.py", line 353, in _get_layout ismath=False) File "/usr/lib64/python2.7/site-packages/matplotlib/backends/ backend_agg.py", line 230, in get_text_width_height_descent renderer=self) File "/usr/lib64/python2.7/site-packages/matplotlib/texmanager.py", line 679, in get_text_width_height_descent page = next(iter(dvi)) File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 89, in __iter__ have_page = self._read() File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 150, in _read self._dispatch(byte) File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 233, in _dispatch self._fnt_def(k, c, s, d, a, l, n) File "/usr/lib64/python2.7/site-packages/matplotlib/dviread.py", line 394, in _fnt_def raise error_class("missing font metrics file: %s" % fontname) OSError: missing font metrics file: cmss10 Any help would be appreciated! Stefan -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Okay, found a solution myself. I had to do a mktexlsr as root to rebuild the ls-R files. Don't know why this not happend during update... Stefan -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (1)
-
Stefan Vater