{"action":"created","issue":{"url":"https://api.github.com/repos/pymc-devs/pymc/issues/37","labels_url":"https://api.github.com/repos/pymc-devs/pymc/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/pymc-devs/pymc/issues/37/comments","events_url":"https://api.github.com/repos/pymc-devs/pymc/issues/37/events","html_url":"https://github.com/pymc-devs/pymc/issues/37","id":86754211,"number":37,"title":"pymc.Matplot.plot fails with LaTeX error","user":{"login":"zpace","id":4908981,"avatar_url":"https://avatars.githubusercontent.com/u/4908981?v=3","gravatar_id":"","url":"https://api.github.com/users/zpace","html_url":"https://github.com/zpace","followers_url":"https://api.github.com/users/zpace/followers","following_url":"https://api.github.com/users/zpace/following{/other_user}","gists_url":"https://api.github.com/users/zpace/gists{/gist_id}","starred_url":"https://api.github.com/users/zpace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zpace/subscriptions","organizations_url":"https://api.github.com/users/zpace/orgs","repos_url":"https://api.github.com/users/zpace/repos","events_url":"https://api.github.com/users/zpace/events{/privacy}","received_events_url":"https://api.github.com/users/zpace/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-06-09T22:22:34Z","updated_at":"2015-07-21T14:01:35Z","closed_at":null,"body":"I tried the disaster_model tutorial, and I'm getting an error when trying to do the final plot using `pymc.Matplot.plot(M)`.\r\n\r\n```\r\nplot(M)\r\nPlotting late_mean\r\n---------------------------------------------------------------------------\r\nRuntimeError                              Traceback (most recent call last)\r\n<ipython-input-27-7b64fd4ca4d6> in <module>()\r\n----> 1 plot(M)\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/pymc/Matplot.pyc in wrapper(pymc_obj, *args, **kwargs)\r\n    339                     if args:\r\n    340                         name = '%s_%s' % (args[0], variable.__name__)\r\n--> 341                     f(data, name, *args, **kwargs)\r\n    342             return\r\n    343         except AttributeError:\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/pymc/Matplot.pyc in plot(data, name, format, suffix, path, common_scale, datarange, new, last, rows, num, fontmap, verbose)\r\n    460             if not path.endswith('/'):\r\n    461                 path += '/'\r\n--> 462             savefig(\"%s%s%s.%s\" % (path, name, suffix, format))\r\n    463 \r\n    464     else:\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/pyplot.pyc in savefig(*args, **kwargs)\r\n    575 def savefig(*args, **kwargs):\r\n    576     fig = gcf()\r\n--> 577     res = fig.savefig(*args, **kwargs)\r\n    578     draw()   # need this if 'transparent=True' to reset colors\r\n    579     return res\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/figure.pyc in savefig(self, *args, **kwargs)\r\n   1474             self.set_frameon(frameon)\r\n   1475 \r\n-> 1476         self.canvas.print_figure(*args, **kwargs)\r\n   1477 \r\n   1478         if frameon:\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_qt5agg.pyc in print_figure(self, *args, **kwargs)\r\n    159 \r\n    160     def print_figure(self, *args, **kwargs):\r\n--> 161         FigureCanvasAgg.print_figure(self, *args, **kwargs)\r\n    162         self.draw()\r\n    163 \r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/backend_bases.pyc in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)\r\n   2209                 orientation=orientation,\r\n   2210                 bbox_inches_restore=_bbox_inches_restore,\r\n-> 2211                 **kwargs)\r\n   2212         finally:\r\n   2213             if bbox_inches and restore_bbox:\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in print_png(self, filename_or_obj, *args, **kwargs)\r\n    519 \r\n    520     def print_png(self, filename_or_obj, *args, **kwargs):\r\n--> 521         FigureCanvasAgg.draw(self)\r\n    522         renderer = self.get_renderer()\r\n    523         original_dpi = renderer.dpi\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw(self)\r\n    467 \r\n    468         try:\r\n--> 469             self.figure.draw(self.renderer)\r\n    470         finally:\r\n    471             RendererAgg.lock.release()\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)\r\n     57     def draw_wrapper(artist, renderer, *args, **kwargs):\r\n     58         before(artist, renderer)\r\n---> 59         draw(artist, renderer, *args, **kwargs)\r\n     60         after(artist, renderer)\r\n     61 \r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/figure.pyc in draw(self, renderer)\r\n   1083         dsu.sort(key=itemgetter(0))\r\n   1084         for zorder, a, func, args in dsu:\r\n-> 1085             func(*args)\r\n   1086 \r\n   1087         renderer.close_group('figure')\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)\r\n     57     def draw_wrapper(artist, renderer, *args, **kwargs):\r\n     58         before(artist, renderer)\r\n---> 59         draw(artist, renderer, *args, **kwargs)\r\n     60         after(artist, renderer)\r\n     61 \r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/axes/_base.pyc in draw(self, renderer, inframe)\r\n   2108 \r\n   2109         for zorder, a in dsu:\r\n-> 2110             a.draw(renderer)\r\n   2111 \r\n   2112         renderer.close_group('axes')\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/artist.pyc in draw_wrapper(artist, renderer, *args, **kwargs)\r\n     57     def draw_wrapper(artist, renderer, *args, **kwargs):\r\n     58         before(artist, renderer)\r\n---> 59         draw(artist, renderer, *args, **kwargs)\r\n     60         after(artist, renderer)\r\n     61 \r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/text.pyc in draw(self, renderer)\r\n    636             if rcParams['text.usetex']:\r\n    637                 renderer.draw_tex(gc, x, y, clean_line,\r\n--> 638                                   self._fontproperties, angle, mtext=mtext)\r\n    639             else:\r\n    640                 renderer.draw_text(gc, x, y, clean_line,\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/backends/backend_agg.pyc in draw_tex(self, gc, x, y, s, prop, angle, ismath, mtext)\r\n    248         im = self.texd.get(key)\r\n    249         if im is None:\r\n--> 250             Z = texmanager.get_grey(s, size, self.dpi)\r\n    251             Z = np.array(Z * 255.0, np.uint8)\r\n    252 \r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/texmanager.pyc in get_grey(self, tex, fontsize, dpi)\r\n    576 \r\n    577         if alpha is None:\r\n--> 578             pngfile = self.make_png(tex, fontsize, dpi)\r\n    579             X = read_png(os.path.join(self.texcache, pngfile))\r\n    580 \r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/texmanager.pyc in make_png(self, tex, fontsize, dpi)\r\n    499         # see get_rgba for a discussion of the background\r\n    500         if DEBUG or not os.path.exists(pngfile):\r\n--> 501             dvifile = self.make_dvi(tex, fontsize)\r\n    502             outfile = basefile + '.output'\r\n    503             command = self._get_shell_cmd(\r\n\r\n/home/zpace/anaconda/lib/python2.7/site-packages/matplotlib/texmanager.pyc in make_dvi(self, tex, fontsize)\r\n    415                      'string:\\n%s\\nHere is the full report generated by '\r\n    416                      'LaTeX: \\n\\n' % repr(tex.encode('unicode_escape')) +\r\n--> 417                      report))\r\n    418             else:\r\n    419                 mpl.verbose.report(report, 'debug')\r\n\r\nRuntimeError: LaTeX was not able to process the following string:\r\n''\r\nHere is the full report generated by LaTeX: \r\n\r\nThis is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014) (preloaded format=latex)\r\n restricted \\write18 enabled.\r\nentering extended mode\r\n(./6139caf44b4d25e442734ff05d9ea044.tex\r\nLaTeX2e <2014/05/01>\r\nBabel <3.9l> and hyphenation patterns for 79 languages loaded.\r\n(/usr/share/texmf-dist/tex/latex/base/article.cls\r\nDocument Class: article 2007/10/19 v1.4h Standard LaTeX document class\r\n(/usr/share/texmf-dist/tex/latex/base/size10.clo))\r\n(/usr/share/texmf-dist/tex/latex/type1cm/type1cm.sty)\r\n(/usr/share/texmf-dist/tex/latex/psnfss/helvet.sty\r\n(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty))\r\n(/usr/share/texmf-dist/tex/latex/psnfss/courier.sty)\r\n(/usr/share/texmf-dist/tex/latex/base/textcomp.sty\r\n(/usr/share/texmf-dist/tex/latex/base/ts1enc.def))\r\n(/usr/share/texmf-dist/tex/latex/geometry/geometry.sty\r\n(/usr/share/texmf-dist/tex/generic/oberdiek/ifpdf.sty)\r\n(/usr/share/texmf-dist/tex/generic/oberdiek/ifvtex.sty)\r\n(/usr/share/texmf-dist/tex/generic/ifxetex/ifxetex.sty)\r\n\r\nPackage geometry Warning: Over-specification in `h'-direction.\r\n    `width' (5058.9pt) is ignored.\r\n\r\n\r\nPackage geometry Warning: Over-specification in `v'-direction.\r\n    `height' (5058.9pt) is ignored.\r\n\r\n) (./6139caf44b4d25e442734ff05d9ea044.aux)\r\n(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)\r\n(/usr/share/texmf-dist/tex/latex/psnfss/ot1pnc.fd)\r\n*geometry* driver: auto-detecting\r\n*geometry* detected driver: dvips\r\n(./6139caf44b4d25e442734ff05d9ea044.aux) )\r\nNo pages of output.\r\nTranscript written on 6139caf44b4d25e442734ff05d9ea044.log.\r\n```\r\n\r\nLaTeX works with some simpler plots (including axes labels and regular text), and nothing seems amiss. Is this a problem with my LaTeX installation/matplotlib itself/am I missing a package?"},"comment":{"url":"https://api.github.com/repos/pymc-devs/pymc/issues/comments/123318299","html_url":"https://github.com/pymc-devs/pymc/issues/37#issuecomment-123318299","issue_url":"https://api.github.com/repos/pymc-devs/pymc/issues/37","id":123318299,"user":{"login":"fonnesbeck","id":81476,"avatar_url":"https://avatars.githubusercontent.com/u/81476?v=3","gravatar_id":"","url":"https://api.github.com/users/fonnesbeck","html_url":"https://github.com/fonnesbeck","followers_url":"https://api.github.com/users/fonnesbeck/followers","following_url":"https://api.github.com/users/fonnesbeck/following{/other_user}","gists_url":"https://api.github.com/users/fonnesbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/fonnesbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fonnesbeck/subscriptions","organizations_url":"https://api.github.com/users/fonnesbeck/orgs","repos_url":"https://api.github.com/users/fonnesbeck/repos","events_url":"https://api.github.com/users/fonnesbeck/events{/privacy}","received_events_url":"https://api.github.com/users/fonnesbeck/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T14:01:35Z","updated_at":"2015-07-21T14:01:35Z","body":"Unfortunately, I've been unable to replicate this on the disaster model tutorial, so its difficult for me to address. "}}