Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Paul Hobson
ipod.com > ******************* > > > On Mon, 25/4/16, Paul Hobson wrote: > > Subject: Re: [Matplotlib-users] subplot layout > To: "Sudheer Joseph" > Cc: "Matpl

Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Sudheer Joseph
tp://oppamthadathil.tripod.com *** On Mon, 25/4/16, Paul Hobson wrote: Subject: Re: [Matplotlib-users] subplot layout To: "Sudheer Joseph" Cc: "Matplotlib Users" Date: Monday

Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Sudheer Joseph
wrote: Subject: Re: [Matplotlib-users] subplot layout To: "Sudheer Joseph" Cc: "Matplotlib Users" Date: Monday, 25 April, 2016, 4:33 PM Your basemap plot is likely setting the aspect of the axes to "equal", so it resizes the plot accordingly. Otherwise you&#

Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Jody Klymak
Yes, the left hand axis is shrinking in the vertical because it is applying the aspect ratio appropriate for 15 N and the N/S extent of your data. Either make the N/S extent of the map larger; make the left hand column wider; or make the figure shorter. Cheers, Jody > On 25 Apr 2016, at 9:

Re: [Matplotlib-users] subplot layout

2016-04-25 Thread Paul Hobson
Your basemap plot is likely setting the aspect of the axes to "equal", so it resizes the plot accordingly. Otherwise you'd have a pretty nasty amount of vertical distortion. When you save the figure, using bbox_inches='tight' will trim the excess white space from the margins: fig.savefig('map_and_

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Jody Klymak
Yes, this works fine: import numpy as np import matplotlib.pyplot as plt eels= np.random.rand(12) averspe = np.random.rand(12) fig,azal = plt.subplots(1,1) azal.locator_params(nbins=10) azal.plot(eels, averspe, label='data') Cheers, Jody PS, easiest is to include self-contained examples. i.e.

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Benjamin Root
You need to do the azal.locator_params() call *after* you create azal. You would get errors otherwise. Ben Root On Thu, Dec 11, 2014 at 11:18 AM, Gabriele Brambilla < gb.gabrielebrambi...@gmail.com> wrote: > > Doing > > azal.locator_params(nbins=4) > azal = rif.add_subplot(111) > azal.plot(eels*(

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Gabriele Brambilla
This guy helped me http://stackoverflow.com/questions/27425974/change-ticks-number-on-a-subplot/27426087?noredirect=1#comment43295472_27426087 thanks anyway Gabriele On Thu, Dec 11, 2014 at 11:18 AM, Gabriele Brambilla < gb.gabrielebrambi...@gmail.com> wrote: > Doing > > azal.locator_params(nb

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Gabriele Brambilla
Doing azal.locator_params(nbins=4) azal = rif.add_subplot(111) azal.plot(eels*(10**9), averspe, label='data') azal.plot(eels*(10**9), beck, label='fit') the program runs but locator_params doesn't do anything doing: azal.yaxis.locator_params(nbins=4) azal = rif.add_subplot(111) azal.plot(eels*(

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Benjamin Root
I wonder if setting the locator params prior to plotting would fix that? Might be one of those rare situations where the order of commands matter in matplotlib. Ben Root On Thu, Dec 11, 2014 at 10:50 AM, Gabriele Brambilla < gb.gabrielebrambi...@gmail.com> wrote: > > Hi, > > I already saw that s

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Gabriele Brambilla
Hi, I already saw that stack overflow page but this is my code: azal = rif.add_subplot(111) azal.plot(eels*(10**9), averspe, label='data') azal.plot(eels*(10**9), beck, label='fit') I tried to add both azal.yaxis.locator_params(nbins=4) or azal.locator_params(nbins=4) and it doesn't work. Gab

Re: [Matplotlib-users] subplot axis ticks

2014-12-11 Thread Jody Klymak
http://stackoverflow.com/questions/6682784/how-to-reduce-number-of-ticks-with-matplotlib is the easy way. You can also write your own “Locators” that are more sophisticated if you have some ideas in mind

Re: [Matplotlib-users] Subplot with multiple axes and change_geometry

2012-06-01 Thread stetogias
stetogias wrote: > > Hi, > > I have a figure with multiple subplots. > > In one of them I need to draw two barcharts. They have the same units in x > and y axes. > Apart from that I'm not sure this is what I need, when I use > change_geometry and I get an exception > on the twined axis since

Re: [Matplotlib-users] Subplot array and colorbar

2012-04-05 Thread Marston
I solved this problem using pyplot and the following code: x = np.arange(22)

Re: [Matplotlib-users] Subplot array and colorbar

2012-04-01 Thread Eric Firing
On 03/31/2012 07:26 AM, Marston wrote: > Hi, I'm trying to create a plot, with subplots where each row of x plots > have a common colorbar beneath it. Only the the top row will have > titles. I've tried creating a function to do this but I only achieve > partial success. Here is an image created in

Re: [Matplotlib-users] subplot and image

2012-01-31 Thread Tony Yu
On Tue, Jan 31, 2012 at 12:56 PM, Petro Khoroshyy wrote: > Hi all > I try to use matplotlib ti anotate some pictures. > I wanted to combine two pictures into one using subplot. But apparently > subplot does not work with images. How can I do it? > Thanks > > P.S. Here is the source: > import pylab

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-30 Thread Tony Yu
On Sun, Jan 29, 2012 at 10:10 PM, C M wrote: > > > On Wed, Jan 4, 2012 at 2:19 PM, Benjamin Root wrote: > >> >> >> On Wednesday, January 4, 2012, jeffsp wrote: >> > >> > plt.tight_layout(), sweet >> > >> > it still makes the labels too close to read, even if they don't overlap. >> > that is, th

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-29 Thread C M
On Wed, Jan 4, 2012 at 2:19 PM, Benjamin Root wrote: > > > On Wednesday, January 4, 2012, jeffsp wrote: > > > > plt.tight_layout(), sweet > > > > it still makes the labels too close to read, even if they don't overlap. > > that is, they're just a continuous string of numbers with no whitespace >

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-04 Thread Benjamin Root
On Wednesday, January 4, 2012, jeffsp wrote: > > plt.tight_layout(), sweet > > it still makes the labels too close to read, even if they don't overlap. > that is, they're just a continuous string of numbers with no whitespace > between. > > it does clean up the rest of the plot really nicely, thou

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-04 Thread jeffsp
plt.tight_layout(), sweet it still makes the labels too close to read, even if they don't overlap. that is, they're just a continuous string of numbers with no whitespace between. it does clean up the rest of the plot really nicely, though, without having to continually dick around with subplot

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-04 Thread Tony Yu
On Wed, Jan 4, 2012 at 1:14 PM, jeffsp wrote: > > I have been wondering the same thing. Matlab is able to prevent labels > from > overlapping each other. Why can't matplotlib? > > > Chris Rodgers-7 wrote: > > > > Hi > > > > Whenever I create figures with at least 3x3 subplots, the x-tick > > la

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2012-01-04 Thread jeffsp
I have been wondering the same thing. Matlab is able to prevent labels from overlapping each other. Why can't matplotlib? Chris Rodgers-7 wrote: > > Hi > > Whenever I create figures with at least 3x3 subplots, the x-tick > labels overlap with each other and they also overlap with the title o

Re: [Matplotlib-users] subplot with specified heights

2011-10-21 Thread Holger Brandsmeier
Indeed, with that link, I was able to make it work. Thanks a lot, Holger On Thu, Oct 20, 2011 at 11:30, Jean-Louis Durrieu wrote: > Hi Holger, > > On Oct 20, 2011, at 11:21 AM, Holger Brandsmeier wrote: >> I would like to have two subplots in a figure one below each other (so >> arranged in a 2x

Re: [Matplotlib-users] subplot with specified heights

2011-10-20 Thread Till Stensitzki
Holger Brandsmeier writes: > > Dear list, > > I would like to have two subplots in a figure one below each other (so > arranged in a 2x1 matrix). I want the upper subplot to have a very > small height compared to the lower one, say 10 times smaller than the > other one. > > How can I do that w

Re: [Matplotlib-users] subplot with specified heights

2011-10-20 Thread Jean-Louis Durrieu
Hi Holger, On Oct 20, 2011, at 11:21 AM, Holger Brandsmeier wrote: > I would like to have two subplots in a figure one below each other (so > arranged in a 2x1 matrix). I want the upper subplot to have a very > small height compared to the lower one, say 10 times smaller than the > other one. > >

Re: [Matplotlib-users] Subplot of subplots.

2011-08-11 Thread Jae-Joon Lee
There are a few options you can try. And I recommend you to use gridspec module. http://matplotlib.sourceforge.net/users/gridspec.html It can also be used with ImageGrid (at least in the master branch, but not sure for 1.0.1 release). I'm attaching a sample script. Regards, -JJ On Sat, Aug 6

Re: [Matplotlib-users] Subplot x-tick labels overlap with each other and with titles

2011-05-05 Thread Goyo
2011/5/5 Chris Rodgers : > 1) Is this the intended behavior of matplotlib, or is there something > wrong with my installation? This is by design, hspace and vspace are proportional to the size of each subplot. Also the number of ticks does not depend on the subplot or labels size (using the defaul

Re: [Matplotlib-users] subplot grids with EPD

2010-10-07 Thread Jakub Nowacki
Hi, Personally I've tried to install Matplotlib 1.0.0 manually in EPD on Mac and Linux. For some reason on Linux it went totally OK from the first try (just had to define PREFIX correctly). On Mac I've tried to do the same but for some reason the libs are linked somehow differently and while t

Re: [Matplotlib-users] subplot grids with EPD

2010-10-06 Thread Robin
On Wed, Oct 6, 2010 at 10:31 AM, Jakub Nowacki wrote: > Hi, > > Personally I've tried to install Matplotlib 1.0.0 manually in EPD on Mac and > Linux. For some reason on Linux it went totally OK from the first try (just > had to define PREFIX correctly). On Mac I've tried to do the same but for > s

Re: [Matplotlib-users] subplot and set_aspect

2010-09-17 Thread Benjamin Root
On Fri, Sep 17, 2010 at 4:57 PM, John Hutchinson wrote: > Hi: > > I am trying to make a 1row by 3 column plot with subplot, and I want > the first plot (subplot(131)) to have equal aspect ratio, but the rest > can auto scale. > > My code results in an empty plot for the 1st column subplot wheneve

Re: [Matplotlib-users] subplot [was: executing function when view interval changes]

2009-08-02 Thread Alan G Isaac
> On Sat, Aug 1, 2009 at 7:32 PM, Alan > G Isaac wrote: >> Which reminds me, was there a decision on subplot2grid etc? >> http://sourceforge.net/mailarchive/message.php?msg_name=6e8d907b0905172009j21b5077fp242c7598ee9fb2c9%40mail.gmail.com> >> On 8/2/2009 1:00 AM John Hunter wrote: > There >

Re: [Matplotlib-users] subplot

2009-05-20 Thread Alan G Isaac
On 5/18/2009 6:25 PM Yannick Copin apparently wrote: rowspan=2, colspan=3) should actually do. What would be the syntax for the following layouts? +-+-+ | | ax2 | | ax1 +-+ | | ax3 | +-+-+ subplot2grid(shape=(2,2), loc=(0,0), rowspan=2) subplot2grid(shape=(2,2), lo

Re: [Matplotlib-users] subplot

2009-05-19 Thread Ryan May
On Tue, May 19, 2009 at 12:00 PM, Jae-Joon Lee wrote: > I think there is no functionality difference between subplot2grid and > SM Window. And the syntax of the subplot2grid seems much more cleaner, > especially when you have large number of cells. So, I'm +1 for > subplot2grid in this regard. >

Re: [Matplotlib-users] subplot

2009-05-19 Thread Christopher Barker
Jae-Joon Lee wrote: > I guess you're referring to mplsizer by Andrew Straw? > > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/toolkits/mplsizer/ yup -- that's it. It looks like it hasn't been touched in a year or so. Maybe this is a good time to revive it? I think it's a great id

Re: [Matplotlib-users] subplot

2009-05-19 Thread Jae-Joon Lee
On Tue, May 19, 2009 at 12:51 PM, Christopher Barker wrote: > Alan G Isaac wrote: >> Using a location along with >> a rowspan and colspan is a >> very established convention. > > This is used by the wxPython GridBagSizer as well. > > Speaking of which, I recall a good while back someone was workin

Re: [Matplotlib-users] subplot

2009-05-19 Thread Jae-Joon Lee
I think there is no functionality difference between subplot2grid and SM Window. And the syntax of the subplot2grid seems much more cleaner, especially when you have large number of cells. So, I'm +1 for subplot2grid in this regard. One thing I like about my option 3 is that it can have some benef

Re: [Matplotlib-users] subplot

2009-05-19 Thread Christopher Barker
Alan G Isaac wrote: > Using a location along with > a rowspan and colspan is a > very established convention. This is used by the wxPython GridBagSizer as well. Speaking of which, I recall a good while back someone was working on a axes layout system modeled after wx Sizers -- anyone know what h

Re: [Matplotlib-users] subplot

2009-05-18 Thread Alan G Isaac
On 5/18/2009 6:25 PM Yannick Copin apparently wrote: > rowspan=2, colspan=3) should actually do. What would be the syntax for > the following layouts? > > +-+-+ > | | ax2 | > | ax1 +-+ > | | ax3 | > +-+-+ subplot2grid(shape=(2,2), loc=(0,0), rowspan=2) subplot2grid(sh

Re: [Matplotlib-users] subplot

2009-05-18 Thread Yannick Copin
Alan G Isaac writes: > On 5/18/2009 4:27 PM Yannick Copin apparently wrote: > > super-mongo WINDOW command (e.g. > > http://www.astro.princeton.edu/~rhl/sm/sm.html#SYN83) > > The functionality is good, > but the syntax is awful. It might not be crystal clear indeed at 1st glance, but once you ge

Re: [Matplotlib-users] subplot

2009-05-18 Thread Alan G Isaac
On 5/18/2009 5:17 PM Alan G Isaac apparently wrote: > subplot2grid(loc=(0,0), rowspan=2, colspan=3) > would confuse nobody (or so I claim). That should have been: subplot2grid(shape=(3,3), loc=(0,0), rowspan=2, colspan=3) Alan Isaac ---

Re: [Matplotlib-users] subplot

2009-05-18 Thread Chaitanya Krishna
Hi guys, +1 for rowspan and colspan. Much cleaner I would say. Chaitanya On Mon, May 18, 2009 at 11:17 PM, Alan G Isaac wrote: > On 5/18/2009 4:27 PM Yannick Copin apparently wrote: >> super-mongo WINDOW command (e.g. >> http://www.astro.princeton.edu/~rhl/sm/sm.html#SYN83) > > > The functional

Re: [Matplotlib-users] subplot

2009-05-18 Thread Alan G Isaac
On 5/18/2009 4:27 PM Yannick Copin apparently wrote: > super-mongo WINDOW command (e.g. > http://www.astro.princeton.edu/~rhl/sm/sm.html#SYN83) The functionality is good, but the syntax is awful. Using a location along with a rowspan and colspan is a very established convention. (E.g., consider

Re: [Matplotlib-users] subplot

2009-05-18 Thread Yannick Copin
Hi, Jae-Joon Lee writes: > I had a few off-list conversation with Alan, and I'm also quite agree > with him for this issue. [...] > issue 2) It is not easy (actually impossible) to make an axes > spanning multiple cells. Regarding this 2nd issue, I appreciated long ago the flexibility and ease

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
On Sun, May 17, 2009 at 5:03 PM, Alan G Isaac wrote: > So I am suggesting that any new functions > certainly should not propagate this anomaly. Understood. And, yes, I guess you're quite right in this regard. And I'll try to deprecate the current matlab-like interface in future (at least in my ax

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
Hi all, I had a few off-list conversation with Alan, and I'm also quite agree with him for this issue. Just to rephrase, I think the current subplot interface has (at least) two issues. issue 1) the indexing convention is not that of python. The index starts from 1, instead of 0. (eg "111") i

Re: [Matplotlib-users] subplot

2009-05-17 Thread Alan G Isaac
On 5/17/2009 2:44 PM Jae-Joon Lee apparently wrote: > I meant consistency with Matplotlib itself. My point is that that is not well defined, since most of the OO API in Matplotlib is Python centric, but the subplot definition is an exception. So I am suggesting that any new functions certainly sh

Re: [Matplotlib-users] subplot

2009-05-17 Thread Jae-Joon Lee
> Oops, sorry about that.  Looks like I have it fixed now. > > JDH > Yes, it looks fine now. Thanks! -JJ -- Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables

Re: [Matplotlib-users] subplot

2009-05-17 Thread John Hunter
On Sat, May 16, 2009 at 10:58 PM, Jae-Joon Lee wrote: >>  http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#rgb-axes > > Thanks a lot, John. > However, example figures are missing currently. (instead it shows a > message "Exception occurred rendering plot."). > Also, AP

Re: [Matplotlib-users] subplot

2009-05-16 Thread Jae-Joon Lee
On Fri, May 15, 2009 at 10:10 PM, John Hunter wrote: > FYI, several weeks ago I updated the official site-docs after you > contributes the axes grid toolkit and docs: > >  http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#rgb-axes Thanks a lot, John. However, example fi

Re: [Matplotlib-users] subplot

2009-05-15 Thread John Hunter
On Fri, May 15, 2009 at 4:24 PM, Jae-Joon Lee wrote: > It may be doable, depending on what you exactly want. > For example > > http://dl.getdropbox.com/u/178748/AxesGrid/htdocs/users/overview.html#rgb-axes > > But my emphasis was on displaying images, and may not be suitable for > general axes.

Re: [Matplotlib-users] subplot

2009-05-15 Thread Jae-Joon Lee
> > Exploring in this area is definitely a good thing.  I kind of like this > proposal and along those lines, I would love to be able to *easily* create a > subplot that occupies 2/3 of a figure in each direction, surrounded by a > bunch of smaller panels that each occupy 1/3.  I know Jae-Joon has

Re: [Matplotlib-users] subplot

2009-05-15 Thread Jae-Joon Lee
On Fri, May 15, 2009 at 2:48 PM, Alan G Isaac wrote: > E.g., ax = fig.subplot2grid(shape=(5,1), loc=(0,3)). It would be good if we can (optionally) specify a location as ranges in each direction so that the axes can occupy not just a single cell of the grid but can spans multiple cells, similar t

Re: [Matplotlib-users] subplot

2009-05-15 Thread Ryan May
On Fri, May 15, 2009 at 1:48 PM, Alan G Isaac wrote: > On 5/15/2009 1:57 PM Ryan May apparently wrote: > > I'm not sure if I like the idea of changing > > the API or not, but if you're suggesting > > I'm less suggesting any particular solution > than suggesting exploring for a solution. > > For e

Re: [Matplotlib-users] subplot

2009-05-15 Thread Alan G Isaac
On 5/15/2009 1:57 PM Ryan May apparently wrote: > I'm not sure if I like the idea of changing > the API or not, but if you're suggesting I'm less suggesting any particular solution than suggesting exploring for a solution. For example, maybe pylab.subplot could use the current convention, but py

Re: [Matplotlib-users] subplot

2009-05-15 Thread Ryan May
On Fri, May 15, 2009 at 12:41 PM, Alan G Isaac wrote: > I love Matplotlib. > > That said, I find the indexing subplots to be an annoyance, > because it uses MATLAB conventions rather than Python > conventions for indexing. I think moving this convention > into the OO API was a mistake. > > Since

Re: [Matplotlib-users] subplot within subplot

2008-09-24 Thread charles reid
Tricky! That is exactly what I was looking for. Thanks John. Charles == Out of damp and gloomy days, out of solitude, out of loveless words directed at us, conclusions grow up in us like fungus: one morning they are there, we know not how, and they gaze upon us, morose and gray. Woe t

Re: [Matplotlib-users] subplot within subplot

2008-09-24 Thread John Hunter
On Wed, Sep 24, 2008 at 1:21 PM, charles reid <[EMAIL PROTECTED]> wrote: > Hi - > > I haven't had any luck finding any examples of putting a subplot within a > subplot in the documentation/website/example files. Is this possible? For > example, I would want something like this: >

Re: [Matplotlib-users] subplot inside subplot

2008-02-06 Thread John Hunter
On Feb 6, 2008 7:51 AM, Vinu Vikram <[EMAIL PROTECTED]> wrote: > Hi All > I have a figure of six subplot. I want to make one subplot in such a way > that I have to plot two data set with common x-axis with the bottom plot is > 30% of the subplot and the upper plot is 70% of the subplot. How can I

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Wayne E. Harlan
Eric: I have never seen any software which dealt with non uniform DPI settings, although that is always a possibility. And all the displays I have ever worked on/with have been the same for both H and V. ( I am a display engineer with over 25 years experience in CRT displays and a bit in flat

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Eric Firing
John Hunter wrote: > On Jan 31, 2008 12:54 AM, Eric Firing <[EMAIL PROTECTED]> wrote: > >> Screens vary. The screen on my laptop has about 130 dpi. Desktop flat >> panels will usually have a smaller value than that. For example, an old >> "15-inch" flat panel with 1024/768 pixels is actually abo

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Alan G Isaac
> On Jan 31, 2008 9:09 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: >> So, to take an example, suppose I set the figsize=(6,4.5) >> and dpi = 80. Then I will get a 480px by 360px figure. >> So if this displays on a 120 dpi monitor it will display >> as roughly 4" by 3". And if I print it unmodif

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread John Hunter
On Jan 31, 2008 9:09 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > So, to take an example, suppose I set the figsize=(6,4.5) > and dpi = 80. Then I will get a 480px by 360px figure. > So if this displays on a 120 dpi monitor it will display > as roughly 4" by 3". And if I print it unmodified to

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Alan G Isaac
On Wed, 30 Jan 2008, "Wayne E. Harlan" apparently wrote: > The figure size determines the eventual size of the figure > where it will be displayed. You should set that with > "figsize=(x,y)" before you actually plot. Then, and very > importantly, you should set the DPI for the medium where >

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread Alan G Isaac
On Thu, 31 Jan 2008, John Hunter apparently wrote: > And it is not unusual to have a different DPI in the > horizontal and vertical directions. In order to support > true physical sizes on the screen, we would need to > support different dpis in the two directions. Does that mean that one sho

Re: [Matplotlib-users] Subplot Questions

2008-01-31 Thread John Hunter
On Jan 31, 2008 12:54 AM, Eric Firing <[EMAIL PROTECTED]> wrote: > Screens vary. The screen on my laptop has about 130 dpi. Desktop flat > panels will usually have a smaller value than that. For example, an old > "15-inch" flat panel with 1024/768 pixels is actually about 12 inches > wide, so dp

Re: [Matplotlib-users] Subplot Questions

2008-01-30 Thread Eric Firing
Alan G Isaac wrote: > On Mon, 28 Jan 2008, Manuel Metz apparently wrote: >> fig = pylab.figure(figsize=(6,10), dpi=96) >> [...] >> pylab.savefig("filename.eps", dpi=96) > > A couple questions. > > 1. The help for figure says that the dpi argument > determines the "resolution". Suppose I am prod

Re: [Matplotlib-users] Subplot Questions

2008-01-30 Thread Wayne E. Harlan
Alan: The figure size determines the eventual size of the figure where it will be displayed. You should set that with "figsize=(x,y)" before you actually plot. Then, and very importantly, you should set the DPI for the medium where you are viewing the figure. A computer display will probabl

Re: [Matplotlib-users] Subplot Questions

2008-01-30 Thread Alan G Isaac
On Mon, 28 Jan 2008, Manuel Metz apparently wrote: > fig = pylab.figure(figsize=(6,10), dpi=96) > [...] > pylab.savefig("filename.eps", dpi=96) A couple questions. 1. The help for figure says that the dpi argument determines the "resolution". Suppose I am producing a PNG file for screen display

Re: [Matplotlib-users] Subplot Questions

2008-01-28 Thread Manuel Metz
Cheng-Kong Wu wrote: > Dear all, > > I am working on sending vibration results to two > plots: subplot(211) and subplot(212). I have the > following questions: > > 1. How to define the size of the figure? I will > eventually import the figure into Microsoft Word, and > I hope I can fit the figure

Re: [Matplotlib-users] subplot, spy, title

2007-05-10 Thread John Hunter
On 5/10/07, Nils Wagner <[EMAIL PROTECTED]> wrote: > Hi all, > > How can I increase the distance between the title and the spy plot ? > > I have used > > figure(1) > subplot(121) > spy(M_bc) > title(r'$M_{red}$') > subplot(122) > title(r'$K_{red}$') > spy(K_bc) > You can set the "y" attribute of t

Re: [Matplotlib-users] subplot overlay problem

2007-03-29 Thread Eric Firing
Peter Melchior wrote: > Hello, > > I understand that hold() creates a axes if there is none. > What I want to do is plotting a couple of plots in each of the subplots. > > The data I want to display is stored in a set of files, thus I have a > loop of plot calls in each subplot: > > hold(True) >

Re: [Matplotlib-users] subplot overlay problem

2007-03-29 Thread Eric Firing
The pylab hold command sets the hold variable for the current axes. If there is none, it makes one, hence the full-size axes on which your subplots are superimposed. The hold variable determines whether subsequent calls to something like "plot" erase the axes first, or superimpose their drawi

Re: [Matplotlib-users] subplot does not work in svn

2007-01-31 Thread Eric Firing
Chris, My guess is that you have some combination of 0.87.7 and svn; the traceback says 0.87.7, and the KeyError is because of an addition to rcParams since 0.87.7. Try this: In [1]:import matplotlib In [2]:matplotlib.rcParams Out[2]: {'axes.axisbelow': False, 'axes.edgecolor': 'k', 'axes

Re: [Matplotlib-users] subplot does not work in svn

2007-01-31 Thread Chris Fonnesbeck
On 1/31/07, John Hunter <[EMAIL PROTECTED]> wrote: > "Chris" == Chris Fonnesbeck <[EMAIL PROTECTED]> writes: Chris> The thing is, I deleted my entire ~/.matplotlib directory, Chris> hoping to start clean. Where does matplotlib get its info Chris> when a .matplotlibrc is not present

Re: [Matplotlib-users] subplot does not work in svn

2007-01-31 Thread Fernando Perez
On 1/31/07, Chris Fonnesbeck <[EMAIL PROTECTED]> wrote: > I am still getting this problem. Here is an ipython traceback of a very > simple plot: > > In [1]: from pylab import * Chris, try xmode verbose in ipython right before running your code. This will make the traceback dump even more deta

Re: [Matplotlib-users] subplot does not work in svn

2007-01-31 Thread John Hunter
> "Chris" == Chris Fonnesbeck <[EMAIL PROTECTED]> writes: Chris> The thing is, I deleted my entire ~/.matplotlib directory, Chris> hoping to start clean. Where does matplotlib get its info Chris> when a .matplotlibrc is not present in my home directory? It first looks in the curre

Re: [Matplotlib-users] subplot does not work in svn

2007-01-31 Thread Chris Fonnesbeck
On 1/6/07, Eric Firing <[EMAIL PROTECTED]> wrote: Chris, I suspect it is a problem with your matplotlibrc file; you could try stripping it down to bare minimum, as in the svn root directory. Another possibility is that your update is somehow incomplete or scrambled with an earlier installation.

Re: [Matplotlib-users] Subplot order

2007-01-15 Thread David Huard
Salut Nicolas, You can get by with something like: a = arange(nrow*ncol)+1 indices = hstack(a.reshape(nrow, ncol).T) for i in indices: subplot(nrow, ncol, i) ... David 2007/1/15, Nicolas Bigaouette <[EMAIL PROTECTED]>: Hi, I want to compare data and I am doing so with subplots. Ideal

Re: [Matplotlib-users] Subplot order

2007-01-15 Thread Martin Richter
I think the easiest way would be using a dictionary: d = {221:221, 222:223, 223:222, 224:224} for i in arange(4): subplot(d[i+221]) plot(arange(10)) text(0.5,0.5,'i=%d'%i) Bye, Martin - Take Surveys. Earn Cash.

Re: [Matplotlib-users] subplot does not work in svn

2007-01-06 Thread Eric Firing
Chris, I suspect it is a problem with your matplotlibrc file; you could try stripping it down to bare minimum, as in the svn root directory. Another possibility is that your update is somehow incomplete or scrambled with an earlier installation. If that doesn't work, try making a minimal scrip

Re: [Matplotlib-users] subplot problem with (altervista) debian package

2006-12-22 Thread Eric Firing
The solution is to uninstall the deb package and install an up-to-date matplotlib. Whether there is a deb package somewhere that will work on debian stable, I don't know, but installing from the tarball is easy if you have the necessary devel packages installed. Eric Thierry Dumont wrote: > I

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Eric Firing
Marius 't Hart wrote: > Using the advice from Seweryn Kokot I was able to install matplotlib > 0.87.7-0, but this resulted in all sorts of errors instead of a graph. > I'll just make do with matplotlib 0.82-5 for now. > Thanks for your advice! > Marius. That is probably because you installed a mat

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Eric Firing
I would encourage anyone running linux to simply build matplotlib from the latest release tarball. It's easy. You may need to install some devel packages first, but once you have stumbled over the missing bits and installed them, then forever after you can very easily update to the latest ver

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Marius 't Hart
Using the advice from Seweryn Kokot I was able to install matplotlib 0.87.7-0, but this resulted in all sorts of errors instead of a graph. I'll just make do with matplotlib 0.82-5 for now. Thanks for your advice! Marius. Josh Lifton schreef: > Unfortunately, 0.87-5 is only available in the 6.10 (

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Josh Lifton
Unfortunately, 0.87-5 is only available in the 6.10 (Edgy) repositories, so we'll have to upgrade to 6.10, request that matplotlib be backported to 6.06, or find a non-Ubuntu repository from which to install the latest matplotlib package. I plan on upgrading sometime soon, so I'll wait for that.

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Marius 't Hart
I have the same symptoms on my Ubuntu 6.06 using python 2.4 and matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not in the repositories as far as I can tell. I use synaptic for upgrading. Josh Lifton schreef: > Thanks for confirming that it works on another system. As I'm cur

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-17 Thread Seweryn Kokot
Marius 't Hart <[EMAIL PROTECTED]> writes: > I have the same symptoms on my Ubuntu 6.06 using python 2.4 and > matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not > in the repositories as far as I can tell. I use synaptic for upgrading. Add the following line to your /etc/apt

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-16 Thread Josh Lifton
Thanks for confirming that it works on another system. As I'm currently using 0.82.5, I suspect upgrading to 0.87.5 (apparently the latest available through official Ubuntu repositories in the newest distribution) will solve the problem. I'll report back once I do this. Any Ubuntu users out ther

Re: [Matplotlib-users] subplot problems using comma notation

2006-11-16 Thread Pierre GM
On Thursday 16 November 2006 23:45, Josh Lifton wrote: > I've been having problems using the subplot command's comma notation Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7) Josh, what version of matplotlib are you using ? ---

Re: [Matplotlib-users] subplot(1,1,[...]) and pprint_getters

2006-10-12 Thread Stefan van der Walt
On Thu, Oct 12, 2006 at 07:00:05PM -0500, John Hunter wrote: > > "Stefan" == Stefan van der Walt <[EMAIL PROTECTED]> writes: > Stefan> if hasattr(val, 'size') and val.size > 6: > > This looks like a numpy vs numeric thing here so we want to make sure > the solution works across

Re: [Matplotlib-users] subplot(1,1,[...]) and pprint_getters

2006-10-12 Thread John Hunter
> "Stefan" == Stefan van der Walt <[EMAIL PROTECTED]> writes: Stefan> One way to fix this would be to change line 379 in Stefan> artist.py from Stefan> if hasattr(val, 'shape') and len(val)>6: Stefan> to Stefan> if hasattr(val, 'size') and val.size