[Matplotlib-users] Controlling spacing between subplots

2011-09-19 Thread Brad Malone
Hi, I am trying to do a simple 2x2 box of plots. My code is so far very simple, and simply looks something like this. ax=subplot(221) > > plot(x2cp,y2cp) > ax.set_title('2cP') > ylabel('Displacement') > ax=subplot(222) > plot(x2cb,y2cb) > ax.set_title('2cB') > ax=subplot(223) > plot(x6fp

Re: [Matplotlib-users] Controlling spacing between subplots

2011-09-19 Thread Brad Malone
lastly, I wanted those y-axes which go from 0.000 to 0.040 to instead go from 0.00 to 0.04 (i.e., only two decimal places, getting rid of the ones that are in between). Thanks for any guidance you can give. Best, Brad On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone wrote: > Hi, I am trying t

Re: [Matplotlib-users] Controlling spacing between subplots

2011-09-20 Thread Brad Malone
of one subplot. Specifically > look at last three lines: > ax = fig.add_subplot(2,2,2) > ax.set_title('b) 5') > ax.set_ylim((0,yUpper)) > for i in tempRun: > ax.plot(x,actSum[1,semi,i,semi], label=tempLabel[i], > linestyle=dashs[i%len(dashs)], color=plotColor[i%len(plotC

Re: [Matplotlib-users] Controlling spacing between subplots

2011-09-20 Thread Brad Malone
x27;) Now I just need to play with spacing and change precise ticklabels and I'll be able to finish this plot up! Thanks everyone, Brad On Tue, Sep 20, 2011 at 9:12 AM, Benjamin Root wrote: > > > On Tue, Sep 20, 2011 at 11:06 AM, Brad Malone wrote: > >> Hi Jeffrey, >&

[Matplotlib-users] constant spacing with griddata

2011-12-19 Thread Brad Malone
Hi, I am trying to use griddata to interpolate some irregularly spaced data onto a linspace-created mesh in order to get a temperature plot. I've been able to follow this example and it's worked perfectly for me: http://matplotlib.sourceforge.net/examples/pylab_examples/griddata_demo.html However

Re: [Matplotlib-users] constant spacing with griddata

2011-12-19 Thread Brad Malone
aker) > 2. Re: basemap UTM conversion discrepancy (Stefan Mertl) > 3. Re: basemap UTM conversion discrepancy (Jeff Whitaker) > 4. constant spacing with griddata (Brad Malone) > 5. Re: constant spacing with griddata (Paul Ivanov) > > >

[Matplotlib-users] Speeding up pcolor plot

2011-12-19 Thread Brad Malone
Hi, I am plotting a grid with pcolor. Below I've got a 1000x1000 grid. xi=linspace(-0.1,x[-1]+2,1000) > yi=linspace(-0.1,maxfreq+10,1000) > print 'Calling griddata...' > zi=griddata(x,y,z,xi,yi,interp='nn') > plt.pcolor(xi,yi,zi,cmap=plt.cm.hot) I am able to plot this on my computer, but it's ve

Re: [Matplotlib-users] Speeding up pcolor plot

2011-12-20 Thread Brad Malone
such I suppose to get a good final plot out of this. Best, Brad On Tue, Dec 20, 2011 at 12:12 AM, Paul Ivanov wrote: > Hey again, Brad, > > Brad Malone, on 2011-12-19 23:44, wrote: > > Hi, I am plotting a grid with pcolor. Below I've got a 1000x1000 grid. > > &g

Re: [Matplotlib-users] Speeding up pcolor plot

2011-12-20 Thread Brad Malone
Tony, Thanks for the pcolormesh suggestion! It is quite a bit faster than pcolor for me (maybe 50-100x faster)! Best, Brad On Tue, Dec 20, 2011 at 10:10 AM, Tony Yu wrote: > > > On Tue, Dec 20, 2011 at 9:22 AM, Brad Malone wrote: > >> HI Paul, >> >> Thanks. I did

[Matplotlib-users] Griddata failling; how to try natgrid version?

2011-12-20 Thread Brad Malone
Hi, I'm still working on my interpolating from an irregularly space grid and then running pcolormesh on the resulting output. With some of the newer data I've been plotting I've noticed that my plots are complete garbage. I realized that this was actually because of the output from griddata rather

Re: [Matplotlib-users] Griddata failling; how to try natgrid version?

2011-12-21 Thread Brad Malone
the one that made it)! Brad On Wed, Dec 21, 2011 at 5:55 AM, Jeff Whitaker wrote: > On 12/21/11 12:31 AM, Brad Malone wrote: > > Hi, I'm still working on my interpolating from an irregularly space grid > and then running pcolormesh on the resulting output. With some of the newer &

[Matplotlib-users] Would RectBivariateSpline work for me? Other ideas?

2011-12-24 Thread Brad Malone
Happy holidays everyone, I'm still working on getting these pcolormesh plots that I'm interested in. Basically I have a grid of data that is irregular but not random. My xgrid values are something similar to [0, 1, 2, 3, 4, 4.5, 5, 5.5, 6, 7, 8 ,9 , 10] to give you a sense. My ygrid values are als

Re: [Matplotlib-users] Would RectBivariateSpline work for me? Other ideas?

2011-12-24 Thread Brad Malone
> > . My ygrid values are also ordered smallest to lowest, although the > spacing as y is increased is much less uniform. > Sorry, of course I meant ygrid values are ordered smallest to highest... -- Write once. Port to ma

[Matplotlib-users] Formatting the ticks in a plot

2012-03-29 Thread Brad Malone
Hello, I am working on a plot in which I need to modify the value of the xticks. A snippet of my code is attached below: fig=figure() > > gs=matplotlib.gridspec.GridSpec(1,2,width_ratios=[3,1]) > gs.update(wspace=0.1) > ax=subplot(gs[0]) > ylabel('Frequency (cm'+r'$^

Re: [Matplotlib-users] Formatting the ticks in a plot

2012-03-29 Thread Brad Malone
xticks([0., 0.015, 0.03]) > ax.set_xticklabels(['0', '0.015', '0.03']) > > Hope that helps, > -paul > > > On Thu, Mar 29, 2012 at 1:13 PM, Brad Malone > wrote: > > Hello, > > > > I am working on a plot in which I need to modify the value

[Matplotlib-users] Combining 4 plots into one figure

2012-07-18 Thread Brad Malone
Hi, I have a collection of 4 plots that I spent some time in constructing. They themselves include modifications of the axes labels, have rotated subplots next to them, etc. I need to be able to take these 4 plots and consolidate them into a single plot (referee suggestion to save space). So is the

Re: [Matplotlib-users] Combining 4 plots into one figure

2012-07-19 Thread Brad Malone
> > > > Personally, I use the subfigure package and it works really well. Also, > +1 for reusable figures. The downside of the subfigure package is your > latex code looks that much worse, but if the journal doesn't mind you > using the subfigure package, then I recommend it. > > Thanks for the com

[Matplotlib-users] Plotting a circle while also changing the limits of the axes

2012-11-05 Thread Brad Malone
Hello, I am trying to plot some small circles in my plotting window, in addition to the curves I'm already plotting. If I don't want to set my x- and y- axis scales equal to each other, a naive drawing of a circle results in an ellipse. To fix this problem I found some nice example code online he

Re: [Matplotlib-users] Plotting a circle while also changing the limits of the axes

2012-11-05 Thread Brad Malone
> > > > Essentially, you want a similar behavior to the markers in the scatter > plots, right? As you zoom or resize the plot, the circle markers stay as > circles and have the same size relative to the size of the figure. If that > is what you want, the way to do that is very easy. > > ax1.scatt

[Matplotlib-users] How to make an arrow all one color?

2011-09-06 Thread Brad Malone
Hi, I am trying to draw a brown arrow to a particular part of my figure but am having some difficulty. The code I'm currently using is something like: annotate('notice > this',xy=(119.628,-7.9158),xytext=(0.8,0.5),textcoords='axes fraction' > > ,arrowprops=dict(facecolor=((0.549,0.176,0.0156)),shr

Re: [Matplotlib-users] How to make an arrow all one color?

2011-09-06 Thread Brad Malone
edgecolor=(0.549,0.176,0.0156), > shrink=0.02,width=1,headwidth=6,frac=0.05), > > Regards, > > -JJ > > > On Wed, Sep 7, 2011 at 10:35 AM, Brad Malone > wrote: > > Hi, I am trying to draw a brown arrow to a particular part of my figu