SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Martin W. <mwi...@gm...> - 2014年10月31日 15:53:46
I am having trouble executing the example for typesetting labels with
latex from http://matplotlib.org/users/usetex.html. Copying the standard
example, tex_demo.py, to a file and executing it gives the following
output:
Traceback (most recent call last):
 File "scratch.py", line 21, in <module>
 plt.savefig('tex_demo')
 File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 561, in
savefig
 return fig.savefig(*args, **kwargs)
 File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1421,
in savefig
 self.canvas.print_figure(*args, **kwargs)
 File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line
2220, in print_figure
 **kwargs)
 File
"/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
505, in print_png
 FigureCanvasAgg.draw(self)
 File
"/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
451, in draw
 self.figure.draw(self.renderer)
 File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1034,
in draw
 func(*args)
 File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in
draw
 a.draw(renderer)
 File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1105, in
draw
 self.label.draw(renderer)
 File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 594, in
draw
 self._fontproperties, angle, mtext=self)
 File
"/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
241, in draw_tex
 self._renderer.draw_text_image(Z, x, y, angle, gc)
OverflowError: cannot convert float infinity to integer
My system is
Linux mwlaptop 3.16.0-24-generic #32-Ubuntu SMP Tue Oct 28 13:07:32 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
My matplotlib version is 1.3.1, and I am using standard packages from my
Ubuntu 14.10 distribution.
From: Martin W. <mwi...@gm...> - 2014年11月02日 19:51:57
I just installed matplotlib 1.4.2 via pip, and executing the file
matplotlib-1.4.2/examples/pylab_examples/tex_demo.py from the source
tarball gives the same error:
Traceback (most recent call last):
 File "matplotlib-1.4.2/examples/pylab_examples/tex_demo.py", line 29,
in <module>
 plt.savefig('tex_demo')
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/pyplot.py",
line 577, in savefig
 res = fig.savefig(*args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py",
line 1470, in savefig
 self.canvas.print_figure(*args, **kwargs)
 File
"/usr/local/lib/python2.7/dist-packages/matplotlib/backend_bases.py",
line 2194, in print_figure
 **kwargs)
 File
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_gtk3agg.py", line 97, in print_png
 return agg.print_png(filename, *args, **kwargs)
 File
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 521, in print_png
 FigureCanvasAgg.draw(self)
 File
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 469, in draw
 self.figure.draw(self.renderer)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py",
line 59, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/figure.py",
line 1079, in draw
 func(*args)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py",
line 59, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File
"/usr/local/lib/python2.7/dist-packages/matplotlib/axes/_base.py", line
2092, in draw
 a.draw(renderer)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py",
line 59, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/axis.py", line
1128, in draw
 self.label.draw(renderer)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/artist.py",
line 59, in draw_wrapper
 draw(artist, renderer, *args, **kwargs)
 File "/usr/local/lib/python2.7/dist-packages/matplotlib/text.py", line
581, in draw
 self._fontproperties, angle, mtext=mtext)
 File
"/usr/local/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py", line 259, in draw_tex
 self._renderer.draw_text_image(Z, x, y, angle, gc)
OverflowError: cannot convert float infinity to integer
System information
Linux mwlaptop 3.16.0-24-generic #32-Ubuntu SMP Tue Oct 28 13:07:32 UTC
2014 x86_64 x86_64 x86_64 GNU/Linux
From: Martin W. <mwi...@gm...> - 2014年11月03日 11:23:01
I just downgraded to matplotlib 1.1.1 and now everything works. Looks
like a regression to me.
On Fri, 2014年10月31日 at 15:53 +0000, Martin Wiebusch wrote:
> I am having trouble executing the example for typesetting labels with
> latex from http://matplotlib.org/users/usetex.html. Copying the standard
> example, tex_demo.py, to a file and executing it gives the following
> output:
> 
> Traceback (most recent call last):
> File "scratch.py", line 21, in <module>
> plt.savefig('tex_demo')
> File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 561, in
> savefig
> return fig.savefig(*args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1421,
> in savefig
> self.canvas.print_figure(*args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line
> 2220, in print_figure
> **kwargs)
> File
> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
> 505, in print_png
> FigureCanvasAgg.draw(self)
> File
> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
> 451, in draw
> self.figure.draw(self.renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1034,
> in draw
> func(*args)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in
> draw
> a.draw(renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1105, in
> draw
> self.label.draw(renderer)
> File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
> File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 594, in
> draw
> self._fontproperties, angle, mtext=self)
> File
> "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
> 241, in draw_tex
> self._renderer.draw_text_image(Z, x, y, angle, gc)
> OverflowError: cannot convert float infinity to integer
> 
> My system is
> 
> Linux mwlaptop 3.16.0-24-generic #32-Ubuntu SMP Tue Oct 28 13:07:32 UTC
> 2014 x86_64 x86_64 x86_64 GNU/Linux
> 
> My matplotlib version is 1.3.1, and I am using standard packages from my
> Ubuntu 14.10 distribution.
> 
> 
From: Thomas C. <tca...@gm...> - 2014年11月03日 14:14:10
Forwarding message to list that should have gone there initialy for
archiving.
---------- Forwarded message ----------
From: Thomas Caswell <tca...@gm...>
Date: Mon, Nov 3, 2014 at 7:50 AM
Subject: Re: [Matplotlib-users] tex rendering broken?
To: Martin Wiebusch <mwi...@gm...>
My first guess is that there is that some thing wrong with your latex
installation as the images on the website are regenerated as part of
building the documentation.
I can not reproduce this problem on a 1.4.2 installation on my computer.
Try cleaning out the tex.cache folder in either or both of
matplotlib.get_cachedir() or matplotlib.get_configdir().
Tom
On Mon, Nov 3, 2014, 06:24 Martin Wiebusch <mwi...@gm...> wrote:
> I just downgraded to matplotlib 1.1.1 and now everything works. Looks
> like a regression to me.
>
> On Fri, 2014年10月31日 at 15:53 +0000, Martin Wiebusch wrote:
> > I am having trouble executing the example for typesetting labels with
> > latex from http://matplotlib.org/users/usetex.html. Copying the standard
> > example, tex_demo.py, to a file and executing it gives the following
> > output:
> >
> > Traceback (most recent call last):
> > File "scratch.py", line 21, in <module>
> > plt.savefig('tex_demo')
> > File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 561, in
> > savefig
> > return fig.savefig(*args, **kwargs)
> > File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1421,
> > in savefig
> > self.canvas.print_figure(*args, **kwargs)
> > File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line
> > 2220, in print_figure
> > **kwargs)
> > File
> > "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
> > 505, in print_png
> > FigureCanvasAgg.draw(self)
> > File
> > "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
> > 451, in draw
> > self.figure.draw(self.renderer)
> > File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> > draw_wrapper
> > draw(artist, renderer, *args, **kwargs)
> > File "/usr/lib/pymodules/python2.7/matplotlib/figure.py", line 1034,
> > in draw
> > func(*args)
> > File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> > draw_wrapper
> > draw(artist, renderer, *args, **kwargs)
> > File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 2086, in
> > draw
> > a.draw(renderer)
> > File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> > draw_wrapper
> > draw(artist, renderer, *args, **kwargs)
> > File "/usr/lib/pymodules/python2.7/matplotlib/axis.py", line 1105, in
> > draw
> > self.label.draw(renderer)
> > File "/usr/lib/pymodules/python2.7/matplotlib/artist.py", line 55, in
> > draw_wrapper
> > draw(artist, renderer, *args, **kwargs)
> > File "/usr/lib/pymodules/python2.7/matplotlib/text.py", line 594, in
> > draw
> > self._fontproperties, angle, mtext=self)
> > File
> > "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line
> > 241, in draw_tex
> > self._renderer.draw_text_image(Z, x, y, angle, gc)
> > OverflowError: cannot convert float infinity to integer
> >
> > My system is
> >
> > Linux mwlaptop 3.16.0-24-generic #32-Ubuntu SMP Tue Oct 28 13:07:32 UTC
> > 2014 x86_64 x86_64 x86_64 GNU/Linux
> >
> > My matplotlib version is 1.3.1, and I am using standard packages from my
> > Ubuntu 14.10 distribution.
> >
> >
>
>
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Thomas Caswell
tca...@gm...
From: Thomas C. <tca...@gm...> - 2014年11月03日 14:14:18
Forwarding message to list that should have gone there initialy for
archiving.
---------- Forwarded message ----------
From: Martin Wiebusch <mwi...@gm...>
Date: Mon, Nov 3, 2014 at 8:26 AM
Subject: Re: [Matplotlib-users] tex rendering broken?
To: Thomas Caswell <tca...@gm...>
On Mon, 2014年11月03日 at 07:50 -0500, Thomas Caswell wrote:
> I can not reproduce this problem on a 1.4.2 installation on my
> computer. Try cleaning out the tex.cache folder in either or both of
>
> matplotlib.get_cachedir() or matplotlib.get_configdir().
Thanks. Clearing the cache directory did the trick. It might be a good
idea to mention matplotlib.get_cachedir() and matplotlib.get_configdir()
explicitly under 'Troubleshooting' on the web page. Currently there is a
link which points you to matplotlib.get_configdir() (which was empty in
my case) but not matplotlib.get_cachedir().
Best regards,
Martin.
-- 
Thomas Caswell
tca...@gm...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /