You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
| 2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
| 2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
| 2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
| 2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
| 2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
| 2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
| 2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
| 2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
| 2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
| 2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
| 2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
| 2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
| 2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(1) |
|
2
(4) |
3
(3) |
4
(2) |
5
(4) |
6
(15) |
7
(17) |
8
(4) |
|
9
(5) |
10
(14) |
11
(16) |
12
(37) |
13
(38) |
14
(16) |
15
(2) |
|
16
(6) |
17
(4) |
18
(14) |
19
(4) |
20
(1) |
21
(14) |
22
(2) |
|
23
(6) |
24
(16) |
25
(4) |
26
(1) |
27
(10) |
28
(30) |
29
(7) |
|
30
(4) |
31
(15) |
|
|
|
|
|
|
From: Fernando P. <fpe...@gm...> - 2006-07-07 22:43:29
|
On 7/7/06, Fernando Perez <fpe...@gm...> wrote: > On 7/7/06, Fernando Perez <fpe...@gm...> wrote: > > > Don't worry about me: I'll fix the mpl sources myself, that's easy > > enough as a workaround. But you may want to take care of this before > > the new release is out, which John mentioned this morning as coming > > soon. > > I got it to work by changing in texmanager.py, line 203, from: > > command = 'latex -interaction=nonstopmode -output-directory="%s" \ > "%s" > "%s"'%(self.texcache, texfile, outfile) > > to: > > command = 'cd "%s" && latex -interaction=nonstopmode "%s" > > "%s"' % \ > (self.texcache,texfile, outfile) > > This will work with any version of latex. But a similar change is also needed for EPS generation. I've just attached a full patch, in case you want it. Cheers, f |
|
From: Fernando P. <fpe...@gm...> - 2006-07-07 22:38:17
|
On 7/7/06, Fernando Perez <fpe...@gm...> wrote:
> Don't worry about me: I'll fix the mpl sources myself, that's easy
> enough as a workaround. But you may want to take care of this before
> the new release is out, which John mentioned this morning as coming
> soon.
I got it to work by changing in texmanager.py, line 203, from:
command = 'latex -interaction=nonstopmode -output-directory="%s" \
"%s" > "%s"'%(self.texcache, texfile, outfile)
to:
command = 'cd "%s" && latex -interaction=nonstopmode "%s"
> "%s"' % \
(self.texcache,texfile, outfile)
This will work with any version of latex.
Cheers,
f
|
|
From: Fernando P. <fpe...@gm...> - 2006-07-07 22:24:44
|
On 7/7/06, Darren Dale <dd...@co...> wrote: > Hi Fernando, > > On Friday 07 July 2006 17:56, Fernando Perez wrote: > > Hi all, > > > > with a current SVN checkout, I'm having serious latex problems (run > > with debug-annoying): > > I'm sorry for the trouble. I tried checking my recent changes on windows and > Linux, and didnt have any trouble, but I didnt try with an older version of > latex. It turns out that version 3.14159 does not support the --output-dir > option. Is updating your tetex an option? I'm using tetex-3.0: No, not really. I'm trying to finish some work to free up a day or two so I can update all of our systems to Ubuntu Dapper, but that means I can't really burn any time on patching pieces of the system. But aside from my own troubles, I suspect that if you guys release 0.87.4 with this bug, I won't be the only one complaining :) There are probably other systems out there still not using tetex-3.0 (I think Red Hat enterprise is fairly conservative in its upgrade policy, and I don't know what Fedora 4 has, though Fedora 5 is likely OK). Don't worry about me: I'll fix the mpl sources myself, that's easy enough as a workaround. But you may want to take care of this before the new release is out, which John mentioned this morning as coming soon. Cheers, f |
|
From: Darren D. <dd...@co...> - 2006-07-07 22:16:58
|
Hi Fernando,
On Friday 07 July 2006 17:56, Fernando Perez wrote:
> Hi all,
>
> with a current SVN checkout, I'm having serious latex problems (run
> with debug-annoying):
I'm sorry for the trouble. I tried checking my recent changes on windows and
Linux, and didnt have any trouble, but I didnt try with an older version of
latex. It turns out that version 3.14159 does not support the --output-dir
option. Is updating your tetex an option? I'm using tetex-3.0:
latex --version
pdfeTeX 3.141592-1.30.5-2.2 (Web2C 7.5.5)
kpathsea version 3.5.5
Copyright 2005 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea is copyright 2005 Karl Berry and Olaf Weber.
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfeTeX source.
Primary author of pdfeTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Kpathsea written by Karl Berry, Olaf Weber, and others.
> In [5]: plot([1,2,3])
> FigureCanvasAgg.draw
> RendererAgg._get_agg_font
> findfont failed New Century Schoolbook
> findfont failed Century Schoolbook L
> findfont failed Utopia
> findfont failed ITC Bookman
> findfont failed Bookman
> findfont found Bitstream Vera Serif, normal, normal 500, normal,
> 12.0 findfont returning
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/mpl-data/Vera
>Se.ttf Found dvipng version 1.8
> latex -interaction=nonstopmode
> -output-directory="/home/fperez/.matplotlib/tex.cache"
>
> "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.tex"
>
> > "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.outp
> >ut"
>
> latex: unrecognized option
> `-output-directory=/home/fperez/.matplotlib/tex.cache'
> Try `latex --help' for more information.
> ---------------------------------------------------------------------------
> exceptions.RuntimeError Traceback (most
> recent call last)
>
> /home/fperez/research/papers/nsform/scripts/<ipython console>
>
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/pylab.py
> in plot(*args=([1, 2, 3],), **kwargs={})
> 2021 except:
> 2022 hold(b)
> -> 2023 raise
> 2024
> 2025 hold(b)
>
> [... snip ...]
>
>
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/text.py
> in _get_layout(self=<matplotlib.text.TextWithDash instance>,
> renderer=<matplotlib.backends.backend_agg.RendererAgg instance>)
> 184 heightt += 3 # 3 pixel pad
> 185 for line in lines:
> --> 186 w,h = renderer.get_text_width_height(
> w = undefined
> h = undefined
> renderer.get_text_width_height = <bound method
> RendererAgg.get_text_width_height of
> <matplotlib.backends.backend_agg.RendererAgg instance at 0x4183ac4c>>
> line = '$0$'
> self._fontproperties = <matplotlib.font_manager.FontProperties
> instance at 0x418402cc>
> global ismath = undefined
> self.is_math_text = <bound method TextWithDash.is_math_text of
> <matplotlib.text.TextWithDash instance at 0x4184030c>>
> 187 line, self._fontproperties,
> ismath=self.is_math_text()) 188
>
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/backends/back
>end_agg.py in
> get_text_width_height(self=<matplotlib.backends.backend_agg.RendererAgg
> instance>, s='$0$', prop=<matplotlib.font_manager.FontProperties
> instance>, ismath='TeX', rgb=(0, 0, 0))
> 237 size = prop.get_size_in_points()
> 238 texmanager = self.get_texmanager()
> --> 239 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
> Z = undefined
> texmanager.get_rgba = <bound method TexManager.get_rgba of
> <matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
> s = '$0$'
> size = 12.0
> self.dpi.get = <built-in method get of tuple object at 0x41736dcc>
> rgb = (0, 0, 0)
> 240 m,n,tmp = Z.shape
> 241 return n,m
>
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
> in get_rgba(self=<matplotlib.texmanager.TexManager instance>,
> tex='$0$', fontsize=12.0, dpi=100.0, rgb=(0, 0, 0))
> 333 if Z is None:
> 334 # force=True to skip cacheing while debugging
> --> 335 pngfile = self.make_png(tex, fontsize, dpi,
> force=False) pngfile = undefined
> self.make_png = <bound method TexManager.make_png of
> <matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
> tex = '$0$'
> fontsize = 12.0
> dpi = 100.0
> global force = undefined
> global False = undefined
> 336 X = readpng(os.path.join(self.texcache, pngfile))
> 337
>
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
> in make_png(self=<matplotlib.texmanager.TexManager instance>,
> tex='$0$', fontsize=12.0, dpi=100.0, force=False)
> 235 # see get_rgba for a discussion of the background
> 236 if force or not os.path.exists(pngfile):
> --> 237 dvifile = self.make_dvi(tex, fontsize)
> dvifile = undefined
> self.make_dvi = <bound method TexManager.make_dvi of
> <matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
> tex = '$0$'
> fontsize = 12.0
> 238 outfile = basefile+'.output'
> 239 command = 'dvipng -bg Transparent -D %s -T tight
> -o "%s" "%s" \
>
> /home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
> in make_dvi(self=<matplotlib.texmanager.TexManager instance>,
> tex='$0$', fontsize=12.0, force=0)
> 207 fh = file(outfile)
> 208 if exit_status:
> --> 209 raise RuntimeError('LaTeX was not able to
> process the flowing \
> global RuntimeError = undefined
> tex = '$0$'
> fh.read = <built-in method read of file object at 0x418375a0>
> 210 string:\n%s\nHere is the full report generated by LaTeX:
> \n\n'% tex + fh.read())
> 211 else: verbose.report(fh.read(), 'debug')
>
> RuntimeError: LaTeX was not able to process the flowing string:
> $0$
> Here is the full report generated by LaTeX:
>
>
>
> In [6]:
>
>
> My matplotlibrc file has (this is what I think is relevant):
>
> backend : TkAgg # the default backend
> numerix : numpy # numpy, Numeric or numarray
> text.usetex : True # use latex for all text handling. For
> more information, see
> #
> http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
> text.dvipnghack : False # some versions of dvipng don't handle
>
>
> This is running on a Fedora Core 3 box. Yes, I'll be upgrading to
> Ubuntu very soon, but in the meantime it would be nice to be able to
> use mpl :)
>
> My latex info:
>
> planck[scripts]> latex --version
> TeX (Web2C 7.4.5) 3.14159
> kpathsea version 3.4.5
> Copyright (C) 1997-2003 D.E. Knuth.
>
>
> Cheers,
>
> f
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
--
Darren S. Dale, Ph.D.
Cornell High Energy Synchrotron Source
Cornell University
200L Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853
dd...@co...
office: (607) 255-9894
fax: (607) 255-9001
|
|
From: Fernando P. <fpe...@gm...> - 2006-07-07 21:56:22
|
Hi all,
with a current SVN checkout, I'm having serious latex problems (run
with debug-annoying):
In [5]: plot([1,2,3])
FigureCanvasAgg.draw
RendererAgg._get_agg_font
findfont failed New Century Schoolbook
findfont failed Century Schoolbook L
findfont failed Utopia
findfont failed ITC Bookman
findfont failed Bookman
findfont found Bitstream Vera Serif, normal, normal 500, normal, 12.0
findfont returning
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/mpl-data/VeraSe.ttf
Found dvipng version 1.8
latex -interaction=nonstopmode
-output-directory="/home/fperez/.matplotlib/tex.cache"
"/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.tex"
> "/home/fperez/.matplotlib/tex.cache/7ba2a6d994e57f6ad218b4d10097765e.output"
latex: unrecognized option
`-output-directory=/home/fperez/.matplotlib/tex.cache'
Try `latex --help' for more information.
---------------------------------------------------------------------------
exceptions.RuntimeError Traceback (most
recent call last)
/home/fperez/research/papers/nsform/scripts/<ipython console>
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/pylab.py
in plot(*args=([1, 2, 3],), **kwargs={})
2021 except:
2022 hold(b)
-> 2023 raise
2024
2025 hold(b)
[... snip ...]
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/text.py
in _get_layout(self=<matplotlib.text.TextWithDash instance>,
renderer=<matplotlib.backends.backend_agg.RendererAgg instance>)
184 heightt += 3 # 3 pixel pad
185 for line in lines:
--> 186 w,h = renderer.get_text_width_height(
w = undefined
h = undefined
renderer.get_text_width_height = <bound method
RendererAgg.get_text_width_height of
<matplotlib.backends.backend_agg.RendererAgg instance at 0x4183ac4c>>
line = '$0$'
self._fontproperties = <matplotlib.font_manager.FontProperties
instance at 0x418402cc>
global ismath = undefined
self.is_math_text = <bound method TextWithDash.is_math_text of
<matplotlib.text.TextWithDash instance at 0x4184030c>>
187 line, self._fontproperties, ismath=self.is_math_text())
188
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py
in get_text_width_height(self=<matplotlib.backends.backend_agg.RendererAgg
instance>, s='$0$', prop=<matplotlib.font_manager.FontProperties
instance>, ismath='TeX', rgb=(0, 0, 0))
237 size = prop.get_size_in_points()
238 texmanager = self.get_texmanager()
--> 239 Z = texmanager.get_rgba(s, size, self.dpi.get(), rgb)
Z = undefined
texmanager.get_rgba = <bound method TexManager.get_rgba of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
s = '$0$'
size = 12.0
self.dpi.get = <built-in method get of tuple object at 0x41736dcc>
rgb = (0, 0, 0)
240 m,n,tmp = Z.shape
241 return n,m
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in get_rgba(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, dpi=100.0, rgb=(0, 0, 0))
333 if Z is None:
334 # force=True to skip cacheing while debugging
--> 335 pngfile = self.make_png(tex, fontsize, dpi, force=False)
pngfile = undefined
self.make_png = <bound method TexManager.make_png of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
tex = '$0$'
fontsize = 12.0
dpi = 100.0
global force = undefined
global False = undefined
336 X = readpng(os.path.join(self.texcache, pngfile))
337
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in make_png(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, dpi=100.0, force=False)
235 # see get_rgba for a discussion of the background
236 if force or not os.path.exists(pngfile):
--> 237 dvifile = self.make_dvi(tex, fontsize)
dvifile = undefined
self.make_dvi = <bound method TexManager.make_dvi of
<matplotlib.texmanager.TexManager instance at 0x41bebd2c>>
tex = '$0$'
fontsize = 12.0
238 outfile = basefile+'.output'
239 command = 'dvipng -bg Transparent -D %s -T tight
-o "%s" "%s" \
/home/fperez/tmp/local/lib/python2.3/site-packages/matplotlib/texmanager.py
in make_dvi(self=<matplotlib.texmanager.TexManager instance>,
tex='$0$', fontsize=12.0, force=0)
207 fh = file(outfile)
208 if exit_status:
--> 209 raise RuntimeError('LaTeX was not able to
process the flowing \
global RuntimeError = undefined
tex = '$0$'
fh.read = <built-in method read of file object at 0x418375a0>
210 string:\n%s\nHere is the full report generated by LaTeX:
\n\n'% tex + fh.read())
211 else: verbose.report(fh.read(), 'debug')
RuntimeError: LaTeX was not able to process the flowing string:
$0$
Here is the full report generated by LaTeX:
In [6]:
My matplotlibrc file has (this is what I think is relevant):
backend : TkAgg # the default backend
numerix : numpy # numpy, Numeric or numarray
text.usetex : True # use latex for all text handling. For
more information, see
#
http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
text.dvipnghack : False # some versions of dvipng don't handle
This is running on a Fedora Core 3 box. Yes, I'll be upgrading to
Ubuntu very soon, but in the meantime it would be nice to be able to
use mpl :)
My latex info:
planck[scripts]> latex --version
TeX (Web2C 7.4.5) 3.14159
kpathsea version 3.4.5
Copyright (C) 1997-2003 D.E. Knuth.
Cheers,
f
|
|
From: John H. <jdh...@ac...> - 2006-07-07 19:42:05
|
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
Eric> Martin, When I try your example with svn matplotlib, I get a
Eric> 34 MB eps file, and looking at it, I don't see much room for
Eric> making it smaller--there is one obvious optimization,
Eric> abbreviating "marker", but that's it. (The svg file is 456
Eric> MB!) So, maybe some major optimization has already been
Eric> done between mpl 0.87.2 and svn.
Yep, Darren got "draw_markers" properly implemented for backend PS.
This function is much better in time and space; I believe only *Agg
and PS implement it, but it could be ported over to SVG fairly easily
by modifying the PS implementation.
Eric> The bigger problem is that each file format has basic
Eric> characteristics and limitations. If you draw a million
Eric> markers and line segments, you are inevitably going to have
Eric> a big postscript file, unless the postscript backend somehow
Eric> detects the fact that almost all of your points are
Eric> indistinguishable and therefore deletes most of them--and
Eric> this is really asking too much of a plotting backend, I
Agg does this for draw_lines -- it drops points in the path that are
less one pixel away from the previous point.
JDH
|
|
From: Eric F. <ef...@ha...> - 2006-07-07 19:30:51
|
Martin, When I try your example with svn matplotlib, I get a 34 MB eps file, and looking at it, I don't see much room for making it smaller--there is one obvious optimization, abbreviating "marker", but that's it. (The svg file is 456 MB!) So, maybe some major optimization has already been done between mpl 0.87.2 and svn. The bigger problem is that each file format has basic characteristics and limitations. If you draw a million markers and line segments, you are inevitably going to have a big postscript file, unless the postscript backend somehow detects the fact that almost all of your points are indistinguishable and therefore deletes most of them--and this is really asking too much of a plotting backend, I think. (An alternative is to generate a pixel image and make the postscript from that; this is what matlab does under some circumstances, but it can result in big files of poor quality.) Your options include: filter your points beforehand so you only plot points that are distinct; or use a pixel-based format like png, which keeps the file size under control. Eric Martin Manns wrote: > Hi, > > When I use matplotlib for a scatter plot with both dots and connecting lines, > the exported eps file is huge, if the distances between many points are small. > I think of this as a bug, since no preview tiff is included in the generated eps > and a variety of text processing applications (including OpenOffice) crash > when I try to import the eps. Ghostscript takes forever, too. Is there anything > that I can do in order to export reasonable eps files? > > I am using: > python 2.4.2 > matplotlib 0.87.2 > numpy 0.9.8 > > with Linux > > The following small example illustrates the problem: > -- > import pylab,numpy,random > random.seed() > x=[random.gauss(0,1)/float(i)**2 for i in xrange(1,1000000)] > X=numpy.array(x,numpy.Float32) > pylab.plot(X[1:],X[:-1],"-", c="#eeeeee") > pylab.plot(X[1:],X[:-1],"xk") > pylab.show() > -- > > The resulting eps file: > -rw-r----- 1 xx users 212190257 Jul 4 09:39 image.eps > > Thanks a lot in advance > > Martin > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Faheem M. <fa...@em...> - 2006-07-07 19:18:18
|
Hi,
I think the bivariate normal probability distribution function
implementation in Matplotlib is buggy. See the example code below, and
note that the change in the x directions and the y directions is not
uniform as it should be.
The implementation (in mlab.py) is appended.
Faheem.
***************************************************************************
minx, maxx = 0, 13
miny, maxy = 0, 13
X, Y = pylab.meshgrid(range(minx, maxx), range(miny, maxy))
conc = 1000*pylab.bivariate_normal(X, Y, sigmax=5.0, sigmay=5.0, sigmaxy=0,
mux=6, muy=6)
[[ 0.08 0.11 0.13 0.15 0.16 0.17 0.17 0.17 0.16 0.15 0.13 0.11 0.08]
[ 0.25 0.32 0.38 0.44 0.48 0.51 0.52 0.51 0.48 0.44 0.38 0.32 0.25]
[ 0.63 0.78 0.93 1.07 1.19 1.26 1.29 1.26 1.19 1.07 0.93 0.78 0.63]
[ 1.26 1.57 1.88 2.16 2.39 2.54 2.59 2.54 2.39 2.16 1.88 1.57 1.26]
[ 2.08 2.59 3.1 3.56 3.94 4.18 4.27 4.18 3.94 3.56 3.1 2.59 2.08]
[ 2.8 3.49 4.18 4.81 5.32 5.65 5.76 5.65 5.32 4.81 4.18 3.49 2.8 ]
[ 3.1 3.86 4.62 5.32 5.88 6.24 6.37 6.24 5.88 5.32 4.62 3.86 3.1 ]
[ 2.8 3.49 4.18 4.81 5.32 5.65 5.76 5.65 5.32 4.81 4.18 3.49 2.8 ]
[ 2.08 2.59 3.1 3.56 3.94 4.18 4.27 4.18 3.94 3.56 3.1 2.59 2.08]
[ 1.26 1.57 1.88 2.16 2.39 2.54 2.59 2.54 2.39 2.16 1.88 1.57 1.26]
[ 0.63 0.78 0.93 1.07 1.19 1.26 1.29 1.26 1.19 1.07 0.93 0.78 0.63]
[ 0.25 0.32 0.38 0.44 0.48 0.51 0.52 0.51 0.48 0.44 0.38 0.32 0.25]
[ 0.08 0.11 0.13 0.15 0.16 0.17 0.17 0.17 0.16 0.15 0.13 0.11 0.08]]
def bivariate_normal(X, Y, sigmax=1.0, sigmay=1.0,
mux=0.0, muy=0.0, sigmaxy=0.0):
"""
Bivariate gaussan distribution for equal shape X, Y
http://mathworld.wolfram.com/BivariateNormalDistribution.html
"""
Xmu = X-mux
Ymu = Y-muy
rho = sigmaxy/(sigmax*sigmay)
z = Xmu**2/sigmax**2 + Ymu**2/sigmay - 2*rho*Xmu*Ymu/(sigmax*sigmay)
return 1.0/(2*pi*sigmax*sigmay*(1-rho**2)) * exp( -z/(2*(1-rho**2)))
|
|
From: Darren D. <dd...@co...> - 2006-07-07 19:13:28
|
Hi Martin, I suggest upgrading to 0.87.3. I can run your test script and can open the resulting eps file. Please note, however, that you are asking for a file that plots 2e6 points. We have already optimized the postscript commands such that each marker or line requires essentially only a single line of postscript code (a great improvement over mpl version 0.87.2), but that still means that we need to write 2e6 points x 18 bytes per point ~ 36 MB (it actually ends up being 41MB), and postscript then has to interpret that massive file. This yields about a factor of 5 improvement in the size of your file, and its about the best we can do for postscript. If you want a smaller file size, I suggest you convert your file to some other format, since most of your data points lie on top of one another, and then convert back to eps if you really need that format. For example, you can convert your 41MB eps file into a 274KB pdf file or a 6KB png file. Finally, we dont include tiff previews in our eps files, so this is not a bug. Darren On Friday 07 July 2006 12:21, Martin Manns wrote: > Hi, > > When I use matplotlib for a scatter plot with both dots and connecting > lines, the exported eps file is huge, if the distances between many points > are small. I think of this as a bug, since no preview tiff is included in > the generated eps and a variety of text processing applications (including > OpenOffice) crash when I try to import the eps. Ghostscript takes forever, > too. Is there anything that I can do in order to export reasonable eps > files? > > I am using: > python 2.4.2 > matplotlib 0.87.2 > numpy 0.9.8 > > with Linux > > The following small example illustrates the problem: > -- > import pylab,numpy,random > random.seed() > x=[random.gauss(0,1)/float(i)**2 for i in xrange(1,1000000)] > X=numpy.array(x,numpy.Float32) > pylab.plot(X[1:],X[:-1],"-", c="#eeeeee") > pylab.plot(X[1:],X[:-1],"xk") > pylab.show() > -- > > The resulting eps file: > -rw-r----- 1 xx users 212190257 Jul 4 09:39 image.eps > > Thanks a lot in advance > > Martin > > > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Darren S. Dale, Ph.D. Cornell High Energy Synchrotron Source Cornell University 200L Wilson Lab Rt. 366 & Pine Tree Road Ithaca, NY 14853 dd...@co... office: (607) 255-9894 fax: (607) 255-9001 |
|
From: Martin M. <mm...@gm...> - 2006-07-07 16:21:38
|
Hi, When I use matplotlib for a scatter plot with both dots and connecting lines, the exported eps file is huge, if the distances between many points are small. I think of this as a bug, since no preview tiff is included in the generated eps and a variety of text processing applications (including OpenOffice) crash when I try to import the eps. Ghostscript takes forever, too. Is there anything that I can do in order to export reasonable eps files? I am using: python 2.4.2 matplotlib 0.87.2 numpy 0.9.8 with Linux The following small example illustrates the problem: -- import pylab,numpy,random random.seed() x=[random.gauss(0,1)/float(i)**2 for i in xrange(1,1000000)] X=numpy.array(x,numpy.Float32) pylab.plot(X[1:],X[:-1],"-", c="#eeeeee") pylab.plot(X[1:],X[:-1],"xk") pylab.show() -- The resulting eps file: -rw-r----- 1 xx users 212190257 Jul 4 09:39 image.eps Thanks a lot in advance Martin |
|
From: Lionel R. <lro...@li...> - 2006-07-07 13:52:16
|
Arg, sorry, I have found the response by myself, I just have to use=20 figure.add_subplot to fix it. Le Vendredi 07 Juillet 2006 15:14, Lionel Roubeyrie a =C3=A9crit=C2=A0: > Hi Jeff, > thanks for the hint, I just need to import one personal GMT file maked a > time ago and used in a plotting project based on GMT, which I try to > convert to matplotlib. > Now I have a little problem to plot a basemap with subplots. Trying to use > contour_demo.py mixed with hist.py to have a map with contours and under = it > an histogram of values, I can't set the colorbar else I loose the map. I > think I have a problem with axes but I'm not very familar with subplottin= g. > Have you an idea of how can I do that? > > Le Vendredi 07 Juillet 2006 13:53, Jeff Whitaker a =C3=A9crit=C2=A0: > > Lionel Roubeyrie wrote: > > > Hi all, > > > Is it possible to import colormap file from GMT (.cpt) to basemap? If > > > yes how can we do that? > > > Thanks > > > > Lionel: I had included the GMT colormaps in matplotlib, but had to take > > them out because of licensing issues. If you want to put them back in, > > put the attached file in your matplotlib install directory > > <sys.prefix>/lib/python2.4/site-packages/matplotlib. Then use a text > > editor to add the following lines to _cm.py (in the same directory) > > > > from gmt_cm import addcmaps > > addcmaps(datad) > > > > right above the line > > > > # reverse all the colormaps. > > > > This will give you the colormaps > > > > GMT_gebco > > GMT_globe > > GMT_haxby > > GMT_no_green > > GMT_ocean > > GMT_polar > > GMT_red2green > > GMT_relief > > GMT_seis > > GMT_wysiwyg > > > > and the corresponding reversed colormaps (with '_r' appended to the > > name). > > > > > > -Jeff =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |
|
From: Lionel R. <lro...@li...> - 2006-07-07 13:14:39
|
Hi Jeff, thanks for the hint, I just need to import one personal GMT file maked a ti= me=20 ago and used in a plotting project based on GMT, which I try to convert to= =20 matplotlib. Now I have a little problem to plot a basemap with subplots. Trying to use= =20 contour_demo.py mixed with hist.py to have a map with contours and under it= =20 an histogram of values, I can't set the colorbar else I loose the map. I=20 think I have a problem with axes but I'm not very familar with subplotting. Have you an idea of how can I do that? Le Vendredi 07 Juillet 2006 13:53, Jeff Whitaker a =C3=A9crit=C2=A0: > Lionel Roubeyrie wrote: > > Hi all, > > Is it possible to import colormap file from GMT (.cpt) to basemap? If y= es > > how can we do that? > > Thanks > > Lionel: I had included the GMT colormaps in matplotlib, but had to take > them out because of licensing issues. If you want to put them back in, > put the attached file in your matplotlib install directory > <sys.prefix>/lib/python2.4/site-packages/matplotlib. Then use a text > editor to add the following lines to _cm.py (in the same directory) > > from gmt_cm import addcmaps > addcmaps(datad) > > right above the line > > # reverse all the colormaps. > > This will give you the colormaps > > GMT_gebco > GMT_globe > GMT_haxby > GMT_no_green > GMT_ocean > GMT_polar > GMT_red2green > GMT_relief > GMT_seis > GMT_wysiwyg > > and the corresponding reversed colormaps (with '_r' appended to the name). > > > -Jeff =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |
|
From: Jeff W. <js...@fa...> - 2006-07-07 11:53:17
|
Lionel Roubeyrie wrote: > Hi all, > Is it possible to import colormap file from GMT (.cpt) to basemap? If yes how > can we do that? > Thanks > Lionel: I had included the GMT colormaps in matplotlib, but had to take them out because of licensing issues. If you want to put them back in, put the attached file in your matplotlib install directory <sys.prefix>/lib/python2.4/site-packages/matplotlib. Then use a text editor to add the following lines to _cm.py (in the same directory) from gmt_cm import addcmaps addcmaps(datad) right above the line # reverse all the colormaps. This will give you the colormaps GMT_gebco GMT_globe GMT_haxby GMT_no_green GMT_ocean GMT_polar GMT_red2green GMT_relief GMT_seis GMT_wysiwyg and the corresponding reversed colormaps (with '_r' appended to the name). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |
|
From: Charles R. T. <ct...@gm...> - 2006-07-07 09:14:03
|
Thanks to all at MatplotLib over the years.
I've been using mpl to automate the plots for a report I've been
working on for several years. It's now been released, along with the
Python scripts, from:
http://sarbayes.org/download.shtml
"Missing Person Behaviour: An Australian Study"
An example figure is attached, and mpl is cited. Thanks again!
-C
--
Charles R. Twardy
|
|
From: Lionel R. <lro...@li...> - 2006-07-07 09:05:49
|
Work very fine here, thanks for the links. Le Vendredi 07 Juillet 2006 10:11, dd...@ja... a =C3=A9crit=C2=A0: > On Friday 07 July 2006 4:11 pm, Lionel Roubeyrie wrote: > > Hi all, > > Is it possible to import colormap file from GMT (.cpt) to basemap? > > If yes how can we do that? > > Thanks > > It's possible. Here's how I've been doing it. > > (1) I use the gmtcolormapPylab function defined in: > http://sourceforge.net/mailarchive/message.php?msg_id=3D11255878 > > (2) Using the above function and a GMT cpt file (e.g. > GMT_no_green.cpt), I set a color dictionary as: > cdict =3D gmtcolormapPylab("GMT_no_green") > > (3) I define a colormap using: > mycmap =3D cm.colors.LinearSegmentedColormap("GMT_no_green",cdict,256) > > (4) I apply the above using cmap=3Dmycolormap in contourf or pcolormesh. > > By the way, in case you don't know of the following site, it has an > exhaustive selection of color palettes: http://cpt-city.org.uk/ > > I've also attached an example of a basemap image using a cpt from the > above site. Masked values not defined by the colormap are shown in > gray. =2D-=20 Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |
|
From: <dd...@ja...> - 2006-07-07 08:12:17
|
On Friday 07 July 2006 4:11 pm, Lionel Roubeyrie wrote: > Hi all, > Is it possible to import colormap file from GMT (.cpt) to basemap? > If yes how can we do that? > Thanks It's possible. Here's how I've been doing it. (1) I use the gmtcolormapPylab function defined in: http://sourceforge.net/mailarchive/message.php?msg_id=11255878 (2) Using the above function and a GMT cpt file (e.g. GMT_no_green.cpt), I set a color dictionary as: cdict = gmtcolormapPylab("GMT_no_green") (3) I define a colormap using: mycmap = cm.colors.LinearSegmentedColormap("GMT_no_green",cdict,256) (4) I apply the above using cmap=mycolormap in contourf or pcolormesh. By the way, in case you don't know of the following site, it has an exhaustive selection of color palettes: http://cpt-city.org.uk/ I've also attached an example of a basemap image using a cpt from the above site. Masked values not defined by the colormap are shown in gray. |
|
From: Lionel R. <lro...@li...> - 2006-07-07 07:11:33
|
Hi all, Is it possible to import colormap file from GMT (.cpt) to basemap? If yes how can we do that? Thanks -- Lionel Roubeyrie - lro...@li... LIMAIR http://www.limair.asso.fr |