Re: [Matplotlib-users] cannot print out .eps figures

2011-03-02 Thread Jouni K . Seppänen
Zhaoru Zhang  writes:

> I created an eps figure file with matplotlib. I can look at it via mac
> preview, but when I inserted it into a word document and printed it
> out, I got nothing except for the eps file information.

It's a long time since I tried using eps files in Word, but I think it
used to only work if you print to a PostScript printer. Does pdf work
better?

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] savefig bbox_inches='tight' does not consider suptitle

2011-03-02 Thread Yuri D'Elia
On Tue, 1 Mar 2011 12:44:20 +0900
Jae-Joon Lee  wrote:

> > Is this a bug?
> 
> Unfortunately, bbox_inches option is never meant to be complete in
> figuring out the exact  size of the figure area.

Why not? What's the purpose of bbox_inches='tight' otherwise?

> However, you  can use "bbox_extra_artists" keyword argument to specify
> additional artists that should be considered when dertermining the
> plot size.
> 
> mytitle = fig.suptitle("Horray!", fontsize=20)
> 
> ...
> 
> fig.savefig("out.png", bbox_inches='tight', bbox_extra_artists=[mytitle])

That doesn't work for me either.


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot print out .eps figures

2011-03-02 Thread Daniel Mader
Hi,

have you tried to print the EPS without putting it into a DOC? Is
there a specific reason for why you don't use an PNG for that task?
Can Word print EPS at all?

Best,
Daniel

2011/3/1 Zhaoru Zhang :
> Hi,
>
> I created an eps figure file with matplotlib. I can look at it via mac 
> preview, but when I inserted it into a word document and printed it out, I 
> got nothing except for the eps file information. So what's the problem? Here 
> are all the packages I used in the python code. Does any of them impact the 
> creation of the eps file? Thanks.
>
> import numpy as np
> import sys
> import matplotlib.pyplot as plt
> from mpl_toolkits.basemap import Basemap
> from get_fbin import get_fbin
> from matplotlib import mathtext
> from matplotlib import rc
> from matplotlib.font_manager import FontProperties
> rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
> rc('text', usetex=True)
>
> and I saved the code in this way:
>
> fig.savefig('pfg1.eps')

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] cannot print out .eps figures

2011-03-02 Thread Benjamin Root
On Tuesday, March 1, 2011, Zhaoru Zhang  wrote:
> Hi,
>
> I created an eps figure file with matplotlib. I can look at it via mac 
> preview, but when I inserted it into a word document and printed it out, I 
> got nothing except for the eps file information. So what's the problem? Here 
> are all the packages I used in the python code. Does any of them impact the 
> creation of the eps file? Thanks.
>
> import numpy as np
> import sys
> import matplotlib.pyplot as plt
> from mpl_toolkits.basemap import Basemap
> from get_fbin import get_fbin
> from matplotlib import mathtext
> from matplotlib import rc
> from matplotlib.font_manager import FontProperties
> rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
> rc('text', usetex=True)
>
> and I saved the code in this way:
>
> fig.savefig('pfg1.eps')
>
>
>
> --
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

I have personally have had problems with eps files in MS PowerPoint,
even from matplotlib.  I don't know if it was the files or PowerPoint.
 Try outputting to PDF format and see if that works better.

Ben Root

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] built docs contain .pyc files

2011-03-02 Thread Jason Grout
I tried building the standalone html docs using:

cd doc
python make.py html

I notice that there are around 30 .pyc files left in the 
build/html/pyplots/ directory.  Are these needed in the html 
documentation build directory?

Also, it seems that the files in _images are redundant, as they are 
referenced in their original directory, not _images.

from the build/html directory:

% find . -name multiline.pdf
./_images/multiline.pdf
./plot_directive/mpl_examples/pylab_examples/multiline.pdf
% grep -ri "multiline.pdf" *
examples/pylab_examples/multiline.html:[source 
code, hires.png,
 
pdf]

Any comments about trimming down the size of the build/html directory?

Thanks,

Jason

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Make the area a bit larger

2011-03-02 Thread Paul Ivanov
Andrea Crotti, on 2011-03-01 10:29,  wrote:
> Gökhan Sever  writes:
> > You can try:
> >
> > fig, ax = plt.subplots(1,1)
> > ax.plot(range(10))
> > fig.subplots_adjust(left=0.05, right=0.95, bottom=0.05, top=0.95)
> >
> 
> Uhm strange, with the version of matplotlib that I have know I have
> subplots_adjust, but I don't have plt.subplots, was it added later?
> Well I can also leave my very convoluted way for now, I'll see later
> what to do...

plt.subplots was added somewhat recently - in this instance it's
equivalent to :

fig = plt.figure()
ax = plt.subplot(1,1,1)
 

Andrea Crotti, on 2011-03-01 12:58,  wrote:
> Paul Ivanov  writes:
> > You can do this with:
> >
> > ax = plt.subplot(111)
> > ax.plot(range(10))
> > ax.set_ymargin(.2)
> > ax.set_xmargin(.1)
> > # or ax.margins(.1,.2)
> > ax.autoscale()
> > plt.draw()
> >
> > see also the docstring for ax.autoscale_view for more.
> 
> Uhm also autoscale and set_xmargin are not implemented in my version of
> matplotlib, too bad I'll just keep my hack for now...

Ok, these were added within the past year as well. I think you
should have an older version of ax.autoscale_view which does
something similar - but it's effectively what you have done in
your original example (though I'm not sure why you want
cast everything as an int there, perhaps that's just what makes
sense for the data you have).

you can see the current code here, if you're curious:
https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/axes.py#L1774

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 


signature.asc
Description: Digital signature
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users