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
(16) |
2
(31) |
3
(17) |
4
(18) |
5
(7) |
6
(5) |
7
(16) |
8
(9) |
9
(19) |
10
(18) |
11
(17) |
12
(7) |
13
(6) |
14
(15) |
15
(16) |
16
(15) |
17
(19) |
18
(27) |
19
(10) |
20
(5) |
21
(5) |
22
(19) |
23
(7) |
24
(11) |
25
(19) |
26
(1) |
27
(36) |
28
(37) |
29
(28) |
30
(36) |
|
|
|
Hi All, I'm trying to make a simple errorbar plot which gets saved to an EPS file. I paste the code below. For some weird reason, the savefig line causes a segmentation fault in ghostscript. when I use (in this case, on my computer) 206 points or more. It doesn't happen if I comment the "pl.rc('text', usetex=True)" line out nor does it happen if I comment the pl.savefig line out. This happens in matplotlib 0.99 and 0.98.5.2. Any help will be greatly appreciated. Regards, Ewald Zietsman #test.py import matplotlib.pyplot as pl import numpy as np pl.rc('text', usetex=True) pl.rc('font', family='serif') N = 206 x1 = np.linspace(-10,10,N) e1 = np.random.randn(N) pl.errorbar(x1, x1, yerr=e1, fmt='k.') pl.savefig('test.eps') pl.show() The error message: python test.py Segmentation fault Traceback (most recent call last): File "test.py", line 16, in <module> pl.savefig('test.eps') File "/usr/lib/python2.5/site-packages/matplotlib/pyplot.py", line 345, in savefig return fig.savefig(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/figure.py", line 990, in savefig self.canvas.print_figure(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1419, in print_figure **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backend_bases.py", line 1308, in print_eps return ps.print_eps(*args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 869, in print_eps return self._print_ps(outfile, 'eps', *args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 892, in _print_ps orientation, isLandscape, papertype) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 1148, in _print_figure_tex else: gs_distill(tmpfile, isEPSF, ptype=papertype, bbox=bbox) File "/usr/lib/python2.5/site-packages/matplotlib/backends/backend_ps.py", line 1268, in gs_distill your image.\nHere is the full report generated by ghostscript:\n\n' + fh.read()) RuntimeError: ghostscript was not able to process your image. Here is the full report generated by ghostscript: GPL Ghostscript 8.63 (2008年08月01日) Copyright (C) 2008 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Loading CenturySchL-Roma font from /var/lib/defoma/gs.d/dirs/fonts/c059013l.pfb... 3423696 1832182 6023256 4166010 1 done.
Hi Everyone, I compiled the latest matplotlib against python 2.5.4 on OSX Leopard (Tcl/Tk 8.4 default installation from OSX). It complained about not finding the freetype headers but this was fixed by including /usr/local in the darwin list (which is by default empty?) in setupext.py. This might be a bug in the latest trunk, can anyone else test this on OSX? Now when I try to run the GUI example on: http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_tk.html I get the following errors: python test.py Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Python(64196,0xa0427720) malloc: *** error for object 0xa00726d8: Non-aligned pointer being freed *** set a breakpoint in malloc_error_break to debug Segmentation fault Does anyone know what might be wrong here? Kind regards, Pim Schellart P.S. I tried the same with a MacPython 2.6 installation and get similar errors (see previous post).
I had similar problem try hi-res png images at 300dpi w/o transparency (ms cannot handle transp. png correctly). ms word shows png little blury, but after printing (to PDF for example) images are sharp as knife 2009年9月2日 Shixin Zeng <zen...@gm...>: > OK, > > I'm attaching a file that converts svg to emf, which is based on > librsvg and cairo. > > I've spent the all night working on this, but the result is still not > satisfying. The converted emf file is even worse than the png file > produced from matplotlib. I'm not sure if it's because I did something > wrong or it's because of the limitation of this method itself. I'm > posting here in hope of some one with more knowledge would enlighten > me. Thanks. > > To build the problem, you need to download librsvg and it's dependency > from http://ftp.gnome.org/pub/gnome/binaries/win32/ > > Best Regards > > Shixin Zeng > > > > On Tue, Sep 1, 2009 at 6:43 PM, Shixin Zeng<zen...@gm...> wrote: >> Hi, >> >> Could someone tell me what's the best format that matplotlib can >> produce for insertion to MS word? I'm working on a paper using MS >> word. I used matplotlib to produce the pictures in "png' format, but >> my professor doesn't satisfy with the quality of the pictures, he asks >> me to do it in "emf" format, but I can't get an "emf" output from >> matplotlib. While other vector formats that are supported by >> matplotlib are not supported by MS word. I have worked days on >> producing this pictures, I don't want to abandon them just because >> they can't be imported to MS word. I really like to produce my >> pictures by using matplotlib, but I can't really throw away MS word. I >> also tried pstoedit to try to convert to emf from the ps, but it >> doesn't work on my system due to some weired missing procedure entry >> points in imagick dll. >> >> I'm kinda in a hurry, any help would be greatly appreciated. >> >> Best Regards >> >> Shixin Zeng >> > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi, I wish to have several (about 3) plots which are updated about once per second, as part of some application that's monitoring an instrument. I set pyplot to interactive mode. I create as many figures as I need, and then I simply plot to them whenever I have new data coming in (each time I plot a new x and y vectors, I don't know if it's possible just to append data points to existing plots). I work on windows xp with the default matplotlib settings. This procedure is very slow. The plots take ages to update. Is there a faster way to do that? Thank you, Raz -- View this message in context: http://www.nabble.com/how-to-update-plots-fast-tp25252745p25252745.html Sent from the matplotlib - users mailing list archive at Nabble.com.
OK, I'm attaching a file that converts svg to emf, which is based on librsvg and cairo. I've spent the all night working on this, but the result is still not satisfying. The converted emf file is even worse than the png file produced from matplotlib. I'm not sure if it's because I did something wrong or it's because of the limitation of this method itself. I'm posting here in hope of some one with more knowledge would enlighten me. Thanks. To build the problem, you need to download librsvg and it's dependency from http://ftp.gnome.org/pub/gnome/binaries/win32/ Best Regards Shixin Zeng On Tue, Sep 1, 2009 at 6:43 PM, Shixin Zeng<zen...@gm...> wrote: > Hi, > > Could someone tell me what's the best format that matplotlib can > produce for insertion to MS word? I'm working on a paper using MS > word. I used matplotlib to produce the pictures in "png' format, but > my professor doesn't satisfy with the quality of the pictures, he asks > me to do it in "emf" format, but I can't get an "emf" output from > matplotlib. While other vector formats that are supported by > matplotlib are not supported by MS word. I have worked days on > producing this pictures, I don't want to abandon them just because > they can't be imported to MS word. I really like to produce my > pictures by using matplotlib, but I can't really throw away MS word. I > also tried pstoedit to try to convert to emf from the ps, but it > doesn't work on my system due to some weired missing procedure entry > points in imagick dll. > > I'm kinda in a hurry, any help would be greatly appreciated. > > Best Regards > > Shixin Zeng >
Forgot to copy the list. ---------- Forwarded message ---------- From: Scott Sinclair <sco...@gm...> Date: 2009年9月2日 Subject: Re: [Matplotlib-users] best format for MS word? To: Shixin Zeng <zen...@gm...> > 2009年9月2日 Shixin Zeng <zen...@gm...>: > Yes, the DPI i'm using is 300, and I tried to change it to 600, or > 1200, but I can't see much difference. Word seems to make PNG's very fuzzy when it needs to rescale them. Two options I can think of are: 1. Try to size the figure so that Word imports it at 100% without scaling (play with the following) >>> import matplotlib.pyplot as plt >>> fig = plt.figure() >>> ax = fig.add_subplot(111) >>> ax.plot([1,2,3]) >>> fig.set_size_inches((4, 3)) >>> plt.savefig('figure.png', dpi=600) 2. Save your figures as PDF's and view at large magnification in Adobe Reader, then use the image select? tool to copy the image to your clipboard. In Word Edit-Paste-Special as an enhanced metafile. Cheers, Scott
I'm trying to deal nicely with the clipping that happens when, for example, a line has data that is inside its clipping box, but the linewidth forces part of the line to be drawn outside of the clipping box. This is visible on the spine placement demo at http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html, for example (the clipping at the top and bottom of most of the sine waves). This has been brought up here (or on the -devel list) before, and it was suggested to just set the clipping off, but that won't work in my case because sometimes I want to use that clipping box to limit the data shown. The best solution I can think of is to expand the clipping box by padding it with the line width. For something like a scatter plot, I would also be okay with expanding the clipping box by padding by the max radius of a circle in the circle collection. However, I can't quite figure out how to do this with the transform framework. If I just pad the clip box using the padded() method, it seems to make it a static Bbox instead of a TransformedBbox, and my line disappears. Can someone help? Here is the example code I'm using. I don't know what to put in for the ???, which is all that I think I need. import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(1,1,1) ax.plot([0,1],[1,1],lw=20) ax.spines['right'].set_color('none') ax.spines['top'].set_color('none') ax.set_ylim([0,1]) line=ax.lines[0] # I still want clipping for things that are outside of the original clip box+linewidth padding # so I don't want to take off clipping; I guess it doesn't matter for this example, but it does for # more complicated examples. #line.set_clip_on(False) bb=line.get_clip_box() # How can I pad bb so that it is padded by linewidth/2*1.0/72*fig.dpi_scale_trans.transform_point([1,1]) dots? padded_bb=??? line.set_clip_box(padded_bb) fig.savefig('test.png') Another option I thought of was separating out masking the data from clipping the graphics. I suppose if I could get the data for the line and mask it to be within the clipbox, but then just set clipping off, I would still have the benefit of clipping things that were way outside of my bounding box, but letting things like an extra bit of linewidth through. However, this requires doing things like computing intersections of the line and the bounding box so that I can insert an extra point for the "end" of the line at the bounding box. This gets harder when the line is a spline or something like that. Thanks for being patient with me while I learn my way around matplotlib's excellent transformation framework. Jason -- Jason Grout
Yes, the DPI i'm using is 300, and I tried to change it to 600, or 1200, but I can't see much difference. Best Regards Shixin Zeng On Tue, Sep 1, 2009 at 9:28 PM, Eric Firing<ef...@ha...> wrote: > Shixin Zeng wrote: >> >> Hi, >> >> Could someone tell me what's the best format that matplotlib can >> produce for insertion to MS word? I'm working on a paper using MS >> word. I used matplotlib to produce the pictures in "png' format, but >> my professor doesn't satisfy with the quality of the pictures, he asks >> me to do it in "emf" format, but I can't get an "emf" output from >> matplotlib. While other vector formats that are supported by >> matplotlib are not supported by MS word. I have worked days on >> producing this pictures, I don't want to abandon them just because >> they can't be imported to MS word. I really like to produce my >> pictures by using matplotlib, but I can't really throw away MS word. I >> also tried pstoedit to try to convert to emf from the ps, but it >> doesn't work on my system due to some weired missing procedure entry >> points in imagick dll. > > Have you tried brute-force? Make a very high-resolution png (use a high > dpi setting in savefig), and import that? > > Eric > > >> >> I'm kinda in a hurry, any help would be greatly appreciated. >> >> Best Regards >> >> Shixin Zeng >> >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 >> 30-Day trial. Simplify your report design, integration and deployment - and >> focus on what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Shixin Zeng wrote: > Hi, > > Could someone tell me what's the best format that matplotlib can > produce for insertion to MS word? I'm working on a paper using MS > word. I used matplotlib to produce the pictures in "png' format, but > my professor doesn't satisfy with the quality of the pictures, he asks > me to do it in "emf" format, but I can't get an "emf" output from > matplotlib. While other vector formats that are supported by > matplotlib are not supported by MS word. I have worked days on > producing this pictures, I don't want to abandon them just because > they can't be imported to MS word. I really like to produce my > pictures by using matplotlib, but I can't really throw away MS word. I > also tried pstoedit to try to convert to emf from the ps, but it > doesn't work on my system due to some weired missing procedure entry > points in imagick dll. Have you tried brute-force? Make a very high-resolution png (use a high dpi setting in savefig), and import that? Eric > > I'm kinda in a hurry, any help would be greatly appreciated. > > Best Regards > > Shixin Zeng > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Yes, with large pictures, PNG is good enough, but when scaling down, it looks a bit fuzzy. Best Regards Shixin Zeng On Tue, Sep 1, 2009 at 8:05 PM, Alan G Isaac<ala...@gm...> wrote: > On 9/1/2009 8:22 PM Shixin Zeng apparently wrote: >> Yes, I tried OOo. But its pdf/ps/svg importer is not good enough > > > I'm afraid that for EPS you will not do better > by moving to a MS product. At least my luck > has been bad. Otoh, I have had pretty good > luck with PNG. > > Alan Isaac > > PS http://wiki.services.openoffice.org/wiki/SVG_Import_Filter > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
How do I utilize pyEmf? AFAIK, it's used by the old emf backend in matplotlib, which is not maintained or functional any more. Best Regards Shixin Zeng On Tue, Sep 1, 2009 at 8:14 PM, Andrew Straw<str...@as...> wrote: > Shixin Zeng wrote: >> Hi, >> >> Could someone tell me what's the best format that matplotlib can >> produce for insertion to MS word? > > You can try PyEMF. I don't know its status -- it might need some TLC. > http://pyemf.sourceforge.net/ >
Shixin Zeng wrote: > Hi, > > Could someone tell me what's the best format that matplotlib can > produce for insertion to MS word? You can try PyEMF. I don't know its status -- it might need some TLC. http://pyemf.sourceforge.net/
On 9/1/2009 8:22 PM Shixin Zeng apparently wrote: > Yes, I tried OOo. But its pdf/ps/svg importer is not good enough I'm afraid that for EPS you will not do better by moving to a MS product. At least my luck has been bad. Otoh, I have had pretty good luck with PNG. Alan Isaac PS http://wiki.services.openoffice.org/wiki/SVG_Import_Filter
Yes, I tried OOo. But its pdf/ps/svg importer is not good enough, it kinda screwed up my pictures, so ... Best Regards Shixin Zeng On Tue, Sep 1, 2009 at 6:50 PM, <jas...@cr...> wrote: > Shixin Zeng wrote: >> >> Hi, >> >> Could someone tell me what's the best format that matplotlib can >> produce for insertion to MS word? I'm working on a paper using MS >> word. I used matplotlib to produce the pictures in "png' format, but >> my professor doesn't satisfy with the quality of the pictures, he asks >> me to do it in "emf" format, but I can't get an "emf" output from >> matplotlib. While other vector formats that are supported by >> matplotlib are not supported by MS word. I have worked days on >> producing this pictures, I don't want to abandon them just because >> they can't be imported to MS word. I really like to produce my >> pictures by using matplotlib, but I can't really throw away MS word. I >> also tried pstoedit to try to convert to emf from the ps, but it >> doesn't work on my system due to some weired missing procedure entry >> points in imagick dll. >> >> I'm kinda in a hurry, any help would be greatly appreciated. >> >> > > A quick google search indicates that OpenOffice can read EPS files > (postscript) and convert to emf. > > Jason > >
Hi, Could someone tell me what's the best format that matplotlib can produce for insertion to MS word? I'm working on a paper using MS word. I used matplotlib to produce the pictures in "png' format, but my professor doesn't satisfy with the quality of the pictures, he asks me to do it in "emf" format, but I can't get an "emf" output from matplotlib. While other vector formats that are supported by matplotlib are not supported by MS word. I have worked days on producing this pictures, I don't want to abandon them just because they can't be imported to MS word. I really like to produce my pictures by using matplotlib, but I can't really throw away MS word. I also tried pstoedit to try to convert to emf from the ps, but it doesn't work on my system due to some weired missing procedure entry points in imagick dll. I'm kinda in a hurry, any help would be greatly appreciated. Best Regards Shixin Zeng
monoped wrote: > > Hi, > > being a complete newbie, I tried to run the simple_plot example from the > website with matplotlib-0.99.0. However, I get the error message: > > -------------------------------------------------------------------- > Traceback (most recent call last): > File "simple_plot.py", line 5, in <module> > plot(t, s, linewidth=1.0) > File "/usr/lib/python2.6/site-packages/matplotlib/pyplot.py", line > 2135, in plot > ax = gca() > File "/usr/lib/python2.6/site-packages/matplotlib/pyplot.py", line > 582, in gca > ax = gcf().gca(**kwargs) > File "/usr/lib/python2.6/site-packages/matplotlib/pyplot.py", line > 276, in gcf > return figure() > File "/usr/lib/python2.6/site-packages/matplotlib/pyplot.py", line > 254, in figure > **kwargs) > File > "/usr/lib/python2.6/site-packages/matplotlib/backends/backend_gtkagg.py", > line 44, in new_figure_manager > return FigureManagerGTKAgg(canvas, num) > File > "/usr/lib/python2.6/site-packages/matplotlib/backends/backend_gtk.py", > line 443, in __init__ > self.window.set_icon_from_file(window_icon) > glib.GError: Couldn't recognize the image file format for file > '/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/matplotlib.svg' > -------------------------------------------------------------------- > I had the same problem, and I fixed it by installing librsvg2-gtk (which allows GTK to use SVG). Hope this helps! -- View this message in context: http://www.nabble.com/Histogram-example-doesn%27t-run-tp24861750p25244040.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Thanks all for the fast reply. The tip with PyX is working fine! So its very easy to combine different eps files! If someone is interested, try something like: from pyx import * c = canvas.canvas() c.insert(epsfile.epsfile(0, 0, "1.eps")) c.insert(epsfile.epsfile(0.5,0.2,"2.eps",scale=0.5)) c.writeEPSfile("output") Thats all! Ciao Jakob -- View this message in context: http://www.nabble.com/Placing-vector-eps-graphics-tp25242043p25243516.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Chuck Pepe-Ranney wrote: > Thanks, I guess my problem is that I am using the latex prosper package to > make presentation slides but I cannot compile prosper documents with > pdflatex (see here <http://www.nefkom.net/georg.drenkhahn/prosper/>). > Sorry, I see that this is not a matplotlib specific question so I will try > to find a solution somewhere else. Have a look at the LaTeX beamer package which produces PDF directly. Thus it's easy to include your PDF pictures without the need to convert them. http://latex-beamer.sourceforge.net/ Ciao Andreas
jakobg wrote: > Hi there, > > I want to place an eps graphic I created in Inkscape in a plot. The final > image is supposed to be a vector eps as well. I looked up the forum but just > found the option with the Image (PIL) library which obviously rasterizes my > vector image. And I use the Tex option so I cannot just save as SVG and do > the compositing stuff in Inkscape. > > The placing of the image is straight forward and fine documented (with > additional axes and imshow), so it is just a problem of importing a eps > vector image. > > I would be very grateful if someone could help me with this issue. > It you could save from inkscape as .svg instead of .eps, you might be able to modify Jae-Joon's trick to directly include this svg into a matplotlib-generated svg file. See http://abitofpythonabitofastronomy.blogspot.com/2009/02/mpl-w-svg-filter-again.html .
You may use PyX for compositing two eps images. It is not a gui application like inkscape. But it is one of the best option I know for eps compositing. http://pyx.sourceforge.net/manual/epsfile.html Regards, -JJ On Tue, Sep 1, 2009 at 11:09 AM, jakobg<jak...@ho...> wrote: > > Hi there, > > I want to place an eps graphic I created in Inkscape in a plot. The final > image is supposed to be a vector eps as well. I looked up the forum but just > found the option with the Image (PIL) library which obviously rasterizes my > vector image. And I use the Tex option so I cannot just save as SVG and do > the compositing stuff in Inkscape. > > The placing of the image is straight forward and fine documented (with > additional axes and imshow), so it is just a problem of importing a eps > vector image. > > I would be very grateful if someone could help me with this issue. > > Thanks! > Jakob > > > > -- > View this message in context: http://www.nabble.com/Placing-vector-eps-graphics-tp25242043p25242043.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Unfortunately, matplotlib doesn't support importing vector images of any sort. Your best bet is to, as you suggest, do the compositing in an external tool, such as Inkscape. Version 0.46 and later claim to support PDF import, you could try that. (Though I haven't tried it with a matplotlib plot personally, so no promises...) Cheers, Mike jakobg wrote: > Hi there, > > I want to place an eps graphic I created in Inkscape in a plot. The final > image is supposed to be a vector eps as well. I looked up the forum but just > found the option with the Image (PIL) library which obviously rasterizes my > vector image. And I use the Tex option so I cannot just save as SVG and do > the compositing stuff in Inkscape. > > The placing of the image is straight forward and fine documented (with > additional axes and imshow), so it is just a problem of importing a eps > vector image. > > I would be very grateful if someone could help me with this issue. > > Thanks! > Jakob > > > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Michael Droettboom wrote: > Ah. I wasn't quite clear on what you were trying to do before. > > There's actually a bit of "magic" in there that automatically adjusts > the xlabel so it is lower than the xtick values. (If you rotate the > xtick values, you can see this in action). So it actually does > position things how you want, but then when it goes to draw it is > automatically lowering the text a little to make room. > > Since I don't see an easy way around this magic, you could not use > xlabel at all and just add some Axes text: > > from matplotlib import text > text = text.Text(1, 0, "Foo") > text.set_transform(offset_copy(axes.transAxes, axes.figure, x=5, > y=0, units='points')) > text.set_clip_on(False) > axes.add_artist(text) > > Completely non-obvious of course :) If there's enough need for the > kind of xlabels you're making, we should probably provide a way to do > this directly, but it would have to be well-tested to ensure it didn't > break existing functionality. > Ah---I realized that there was some automagic positioning going on if I didn't use subplot.xaxis.set_label_coords (thank goodness that I can read the source!). So now I have something that *almost* works perfectly. Here is a complete example: import matplotlib.pyplot as plt import numpy as np from matplotlib.transforms import offset_copy fig = plt.figure() x = np.linspace(0,2*np.pi,100) y = 2*np.sin(x) ax = fig.add_subplot(1,1,1) ax.plot(x,y) # works xaxis='bottom' not_xaxis='top' # doesn't work #xaxis='top' #not_xaxis='bottom' # works yaxis='left' not_yaxis='right' # doesn't work #yaxis='right' #not_yaxis='left' ax.spines[xaxis].set_position(('outward',10)) ax.xaxis.set_ticks_position(xaxis) ax.spines[yaxis].set_position(('outward',10)) ax.yaxis.set_ticks_position(yaxis) ax.spines[not_xaxis].set_color('none') ax.spines[not_yaxis].set_color('none') xlabel=ax.xaxis.get_label() xlabel.set_horizontalalignment('left') xlabel.set_verticalalignment('baseline') trans=ax.spines[xaxis].get_transform() labeltrans=offset_copy(trans, fig, x=8, y=0, units='points') ax.xaxis.set_label_coords(x=1,y=0,transform=labeltrans) ylabel=ax.yaxis.get_label() ylabel.set_horizontalalignment('center') ylabel.set_verticalalignment('center') ylabel.set_rotation('horizontal') trans=ax.spines[yaxis].get_transform() labeltrans=offset_copy(trans, fig, x=0, y=12, units='points') ax.yaxis.set_label_coords(x=0,y=1,transform=labeltrans) ax.set_xlabel('x axis') ax.set_ylabel('y axis') fig.savefig('test.png',bbox_inches='tight') When I make the x-axis the top spine, or the y-axis the right spine, though (uncomment the "doesn't work" parts above), the labels end up on the wrong side of the axes. Any idea about what is going on here? Is it related to the post I just made to matplotlib-devel entitled "spines with 'axes' positions show in wrong place?"? Also, I was wondering if I should use the ax.spines[yaxis].get_spine_transform() instead of ax.spines[yaxis].get_transform(). It didn't seem to help in the above issue, but I wasn't sure what the difference was between get_spine_transform and get_transform was. Thanks, Jason -- Jason Grout
Hi there, I want to place an eps graphic I created in Inkscape in a plot. The final image is supposed to be a vector eps as well. I looked up the forum but just found the option with the Image (PIL) library which obviously rasterizes my vector image. And I use the Tex option so I cannot just save as SVG and do the compositing stuff in Inkscape. The placing of the image is straight forward and fine documented (with additional axes and imshow), so it is just a problem of importing a eps vector image. I would be very grateful if someone could help me with this issue. Thanks! Jakob -- View this message in context: http://www.nabble.com/Placing-vector-eps-graphics-tp25242043p25242043.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Ah. I wasn't quite clear on what you were trying to do before. There's actually a bit of "magic" in there that automatically adjusts the xlabel so it is lower than the xtick values. (If you rotate the xtick values, you can see this in action). So it actually does position things how you want, but then when it goes to draw it is automatically lowering the text a little to make room. Since I don't see an easy way around this magic, you could not use xlabel at all and just add some Axes text: from matplotlib import text text = text.Text(1, 0, "Foo") text.set_transform(offset_copy(axes.transAxes, axes.figure, x=5, y=0, units='points')) text.set_clip_on(False) axes.add_artist(text) Completely non-obvious of course :) If there's enough need for the kind of xlabels you're making, we should probably provide a way to do this directly, but it would have to be well-tested to ensure it didn't break existing functionality. Mike jas...@cr... wrote: > Michael Droettboom wrote: >> The xlabel doesn't use the data transform, it uses the axes >> transform, where the edges of the axes always go from 0.0 to 1.0, >> regardless of the data extents. Therefore, tou can start with the >> label's default transform: >> >> trans = xlabel.get_transform() >> >> and use that as the basis for the offset transform >> >> offtrans = offset_copy(trans, subplot.figure, x=5, y=0, units='points') >> >> and set the label's position, alignment and transform: >> >> xlabel.set_position((1, 0)) >> xlabel.set_ha('right') >> xlabel.set_transform(offtrans) >> >> Hope that does what you're after. > > > Thanks! This helps a lot. > I notice with the following, the x-axis label is lined up with its > baseline equal to the baseline of the tick labels. I'd like the > baseline to be the same as the actual axis line. What should I do to > get the baseline of the x-axis label to be the actual axis line? I've > been working on this for a while tonight, and I've made a lot of > progress, but now I'm getting confused. Is there some sort of padding > going on, even though I set labelpad=0? Is the problem I'm seeing > because I started from xlabel.get_transform(), which already has the > padding builtin? > > from matplotlib.transforms import offset_copy > subplot.xaxis.labelpad=0 > xlabel=subplot.xaxis.get_label() > trans=xlabel.get_transform() > xlabel.set_horizontalalignment('left') > xlabel.set_verticalalignment('baseline') > > xlabel.set_transform(offset_copy(trans,subplot.figure,x=5,y=0,units='points')) > > xlabel.set_position((1,0)) > > > Thanks, > > Jason > > -- > Jason Grout > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
Without a some example code to reproduce the bug, it's going to be very difficult to track this down. The "pick_event_demo.py" is working for me, and it flows through the offending method without problems. It's possible that your code sets things up in a way we didn't anticipate and it worked "by accident" in earlier versions, and a change has broken it now. We'd like to not have these breakages, but without seeing what you're doing, it's impossible to avoid that. If you can't provide a standalone example, can you at least provide the complete traceback (not just the inner most frame)? Mike Andrew Kelly wrote: > I spent some time trying to cobble one together but it was taking too > much time so I tried the following and it seems to work now: > > Instead of using a thick line2D and adding it to the drawing, I added > a patches.Rectangle instead. The line2D works in 0.88.5 but not in > 0.99. The newer version was tripping over the Artist.contains() > function call when used with line2D. > > On Mon, Aug 31, 2009 at 1:28 PM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > Can you provide a standalone example that reproduces this error? > > Cheers, > Mike > > Andrew Kelly wrote: > > I recently re-installed matplotlib (0.99) on my vista machine > and my code that worked yesterday (no changes) no longer runs > because of the following matplotlib error: > > File "C:\Python25\Lib\site-packages\matplotlib\lines.py", > line 286, in contains > path, affine = > self._transformed_path.get_transformed_path_and_affine() > AttributeError: 'NoneType' object has no attribute > 'get_transformed_path_and_affine' > > All I am doing is initially drawing a line2D (which works) and > then testing if line2D.contains(event)==True if I mouse over > the line. As I said this worked fine yesterday. > > I tried re-installing with an older version but to no avail. > I am totally clueless as to why this is happening. Anyone > have a guess. > > -Andrew > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day trial. Simplify your report design, > integration and deployment - and focus on what you do best, > core application coding. Discover what's new with Crystal > Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA