[Matplotlib-users] optimal dpi for imshow

2009-03-19 Thread Art
Is there a way to figure out the optimal dpi for imshow when saving as a png so that all the pixels are visible? I do something like the following: import matplotlib.pyplot as plt plt.clf() image = np.random.normal(0,1, (1000,1000)) plt.imshow(I, cmap=plt.cm.gray, interpolation='nearest', aspect=

Re: [Matplotlib-users] Installing matplotlib for python 2.6 under windows

2009-03-19 Thread Romi Agar
Aha, I did not have VC++ 2008 EE on my PC, so it actually didn't compile anything. Now that I have it, I get a dependency problem with Freetype2. The build command fails with: c:\python26\matpotlib\src\ft2font.h(13) : fatal error C1083: Cannot open include file: 'ft2build.h': No such file or di

Re: [Matplotlib-users] How to turn off all clipping?

2009-03-19 Thread John Hunter
On Thu, Mar 19, 2009 at 2:33 PM, Eric Firing wrote: > > > def noclip(ax): > "Turn off all clipping in axes ax; call immediately before drawing" > ax.set_clip_on(False) > artists = [] Or even better:: for o in fig.findobj(): o.set_clip_on(False) findobj is an artist method that

Re: [Matplotlib-users] How to turn off all clipping?

2009-03-19 Thread Eric Firing
Hatch, Sara J wrote: > Matplotlib Folks, > > > > How do I turn off all clipping when making a plot? It seems like > everything has a set_clip_on argument, but I couldn’t figure out how to > set all of these to False without explicitly doing so in every plot > call. I would assume that there

Re: [Matplotlib-users] Installing matplotlib for python 2.6 under windows

2009-03-19 Thread Andrew Straw
Romi Agar wrote: > Hi! > > I'm having a bit difficulty getting matplotlib to run under windows > (vista x64) with python 2.6. > I downloaded the source from svn, ran the build and install commands, Does that mean "python setup.py install"? > then copied the content of /build/lib.win32-2.6 > to

Re: [Matplotlib-users] title when using subplot

2009-03-19 Thread ntroutman
The easiest solution is the "title" keyword for subplot: pylab.subplot(221, title='A Title for 221') I'm using matplotlib/pylab 0.98.3 -- NTroutman Tommy Grav wrote: > > I have a plot that is divided into four subplots. > > pylab.figure() > pylab.subplot(221) > pylab.plot(a,b,"k-") > pylab.

[Matplotlib-users] Installing matplotlib for python 2.6 under windows

2009-03-19 Thread Romi Agar
Hi! I'm having a bit difficulty getting matplotlib to run under windows (vista x64) with python 2.6. I downloaded the source from svn, ran the build and install commands, then copied the content of /build/lib.win32-2.6 to Lib/site-packages folder. But when I try to import pylab I get the follow

Re: [Matplotlib-users] Mathtext font size difference

2009-03-19 Thread Ryan May
Awesome. Thanks for the quick fix and the tip about using 'rm'. Ryan On Thu, Mar 19, 2009 at 9:43 AM, Michael Droettboom wrote: > They're actually different fonts. The one on the left is Vera Sans, the > one on right is Stix Sans. There is a bug where regular (meaning Vera) text > in math wa

Re: [Matplotlib-users] Mathtext font size difference

2009-03-19 Thread Michael Droettboom
They're actually different fonts. The one on the left is Vera Sans, the one on right is Stix Sans. There is a bug where regular (meaning Vera) text in math was getting mapping to Stix Sans when mathtext.fontset is set to stixsans. (This should now be fixed in SVN). All that said, fixing this

[Matplotlib-users] Mathtext font size difference

2009-03-19 Thread Ryan May
Mike, Is there supposed to be a difference in the size of text printed with and without mathtext? Here's a simple script that shows what I'm talking about: import matplotlib.pyplot as plt f = plt.figure() ax1 = f.add_subplot(1,2,1) ax1.set_title('Hello') ax2 = f.add_subplot(1,2,2) ax2.set_title(

Re: [Matplotlib-users] More funky font baselines

2009-03-19 Thread Ryan May
That fixed it for me, thanks. Ryan On Thu, Mar 19, 2009 at 7:54 AM, Michael Droettboom wrote: > Thanks. I think I have this fixed in SVN again... > > Basically what's happening is that Freetype's hinting imposes a vertical > scale on the glyph that wasn't being taken into account. > > Mike > >

Re: [Matplotlib-users] More funky font baselines

2009-03-19 Thread Michael Droettboom
Thanks. I think I have this fixed in SVN again... Basically what's happening is that Freetype's hinting imposes a vertical scale on the glyph that wasn't being taken into account. Mike Ryan May wrote: > Mike, > > I've found another case of the funk baseline: > > import matplotlib.pyplot as plt