Re: [Matplotlib-users] two scales in the same plot

2009-04-29 Thread Ondrej Certik
On Fri, Apr 24, 2009 at 1:10 PM, Sandro Tosi wrote: > Hi Ondrej, > nice to see you here :) Nice to see you too! :) > > On Fri, Apr 24, 2009 at 22:02, Ondrej Certik wrote: >> Hi, >> >> is there a way to have one plot with two functions, one using some >> scale, the other one a different scale an

Re: [Matplotlib-users] Font size and savefig

2009-04-29 Thread Thomas Robitaille
Hi Jae-Jong and John, Thanks for your replies! While experimenting with this to send screenshots, I realized that my default backend was set to MacOSX, not WXAgg. The WXAgg output to the screen actually agrees with the PNG output in terms of font sizes. But the font sizes differ between the

Re: [Matplotlib-users] Pixel Position of X/Y Axis

2009-04-29 Thread Jae-Joon Lee
You may use the bbox attribute of the axes. For example, ax.bbox.extents gives you the x,y coordinates of the lowerleft and topright corners. -JJ On Wed, Apr 29, 2009 at 4:06 PM, Mark Larsen wrote: > It's been a while, please allow me to bump this... > >> Sorry.  I use matplotlib to create PNGs

Re: [Matplotlib-users] Fixed patch relative to axes

2009-04-29 Thread Eric Firing
Thomas Robitaille wrote: > Thanks! > > Is there an easy way to keep a reference to patches? I notice that for > example > > p = ax.add_patch(Circle((0.5,0.5),radius=0.5)) > > does not work (p is not a reference to the patch). Is there a way to > keep a reference so I can update the properties

Re: [Matplotlib-users] Fixed patch relative to axes

2009-04-29 Thread Thomas Robitaille
Thanks! Is there an easy way to keep a reference to patches? I notice that for example p = ax.add_patch(Circle((0.5,0.5),radius=0.5)) does not work (p is not a reference to the patch). Is there a way to keep a reference so I can update the properties of the patch at a later time? Cheers,

Re: [Matplotlib-users] Fixed patch relative to axes

2009-04-29 Thread Eric Firing
Thomas Robitaille wrote: > Hi, > > Is there an easy way to draw a patch or a patchcollection such that it > always stays at the same relative position in a set of axes, rather > than at the same pixel position? So for example, I would want to plot > it at (0.1,0.1) relative to the axes, and

[Matplotlib-users] Fixed patch relative to axes

2009-04-29 Thread Thomas Robitaille
Hi, Is there an easy way to draw a patch or a patchcollection such that it always stays at the same relative position in a set of axes, rather than at the same pixel position? So for example, I would want to plot it at (0.1,0.1) relative to the axes, and if I zoom in I would still want it

Re: [Matplotlib-users] Integrating matplotlib into a GUI

2009-04-29 Thread Gökhan SEVER
Hi Gary, Could you please give some information on how Traits compare to Wx or Qt? What are Traits' limits? I haven't started writing anything on GUI level yet, but spending time to understand the Traits way. Thank you. Gökhan On Wed, Apr 29, 2009 at 11:10 AM, Gary Pajer wrote: > On Sun, Apr

[Matplotlib-users] matplotlib for Python 2.6

2009-04-29 Thread R. Padraic Springuel
Is there a Windows installer file for matplotlib for Python 2.6? I couldn't find one on the download page, but have to admit to being in something of a hurry and so didn't look too hard. -- R. Padraic Springuel Research Assistant Department of Physics and Astronomy University of Maine Bennett

Re: [Matplotlib-users] Pixel Position of X/Y Axis

2009-04-29 Thread Mark Larsen
It's been a while, please allow me to bump this... > Sorry.  I use matplotlib to create PNGs graphics for display on a > web-page.  I want to make the plots zoom-able.  I'll use javascript to > capture the pixel positions of the user's selected zoom region on the > PNG plot.  I'll then translate t

Re: [Matplotlib-users] fill_between and masked array

2009-04-29 Thread Eric Firing
John Hunter wrote: > > > On Wed, Apr 29, 2009 at 11:03 AM, John Hunter > wrote: > > > ...but I'd like more feedback from the author or users of > fill_between > before committing that change. (That, and Eric Firing can > probably find

Re: [Matplotlib-users] last tick label not showing up

2009-04-29 Thread Erik Thompson
Matthias, Thanks for your help. When I did ax.set_xlim((0.0, 120.0)) the 180 tick showed up although ugly on some plots because there was missing data at the 180 degrees mark. I then copied all the datapoints from the -180 degrees into new 180 degree data points (they are the supposed to be the

Re: [Matplotlib-users] last tick label not showing up

2009-04-29 Thread Jae-Joon Lee
On Wed, Apr 29, 2009 at 12:21 PM, Matthias Michler wrote: > where the last tick is out of the xlimits. Could this be the case for your > example, too? > Nevertheless the question still would be: Is this a bug in the handling of > xticks and their corresponding labels? get_majorticklocs (and simi

Re: [Matplotlib-users] last tick label not showing up

2009-04-29 Thread Matthias Michler
Hello Erik, I can reproduce your problem (mpl 0.98.6svn) with the following little example: import matplotlib.pyplot as plt ax = plt.axes() ax.set_xlim((0.0, .)) print ax.xaxis.get_majorticklocs() plt.show() where the last tick is out of the xlimits. Could this be the case for your example

Re: [Matplotlib-users] Integrating matplotlib into a GUI

2009-04-29 Thread Gary Pajer
On Sun, Apr 26, 2009 at 6:41 PM, Gökhan SEVER wrote: > Hello, > > Thanks for the pointer Bryan. I also seen Gael's tutorial > (http://gael-varoquaux.info/computers/traits_tutorial/index.html) > > To me, it seems much easier to use Traits, instead of learning WX or QT. It is. I had spent hours le

Re: [Matplotlib-users] fill_between and masked array

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 11:03 AM, John Hunter wrote: > >> ...but I'd like more feedback from the author or users of fill_between >> before committing that change. (That, and Eric Firing can probably find >> a much more efficient way to do the masked array manipulation... ;) > > > I'm working on

Re: [Matplotlib-users] fill_between and masked array

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 10:56 AM, Michael Droettboom wrote: > I don't believe fill_between directly supports missing values -- but it > does have the where parameter for this purpose. > > We could also be smarter about how "where" is generated when none is > provided: > >if where is None:

Re: [Matplotlib-users] fill_between and masked array

2009-04-29 Thread Michael Droettboom
I don't believe fill_between directly supports missing values -- but it does have the where parameter for this purpose. We could also be smarter about how "where" is generated when none is provided: if where is None: where = (~np.ma.getmaskarray(x) & ~np.ma.getmaskarray(y1)

Re: [Matplotlib-users] fill_between and masked array

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 6:40 AM, Andres Luhamaa wrote: > Hello, > I try to do fill_between two arrays, that have missing value (masked > arrays). Following code shows behaviour that seems not correct. Images what > I expect the result to be (by omitting the missing value) and what I get by > plott

Re: [Matplotlib-users] fill_between and masked array

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 10:54 AM, John Hunter wrote: > > > fill_between does not currently support masked arrays, but I think we could > easily extend it to support the mask using the existing support for the > "where" kwarg. For now, does this behave like you expect? > > valid = ~(edatmax.mas

Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-29 Thread Adam
On Wed, Apr 29, 2009 at 9:22 AM, John Hunter wrote: > > > On Wed, Apr 29, 2009 at 9:50 AM, Adam wrote: >> >> I would like to have access to the command line while simultaneously >> being able to interact with and/or display plots.  I think this is >> what ipython does by default when you pass it

Re: [Matplotlib-users] Histogram of 2D Data

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 9:59 AM, marcog wrote: > > Hi > > I have a set of 2 dimensional data that I would like to form a histogram > of. > Each data point is defined by an x and y variable. So essentially what I > would like to obtain is a "row" of histograms as produced by the plot.hist > functi

Re: [Matplotlib-users] Font size and savefig

2009-04-29 Thread John Hunter
On Tue, Apr 28, 2009 at 11:24 PM, Jae-Joon Lee wrote: > On Tue, Apr 28, 2009 at 11:09 PM, John Hunter wrote: > > If you want the relative fontsizes in the figure window and saved figure > to > > agree, pass the same "dpi" to the figure command and savefig command. > > John, > I thought the font

[Matplotlib-users] Histogram of 2D Data

2009-04-29 Thread marcog
Hi I have a set of 2 dimensional data that I would like to form a histogram of. Each data point is defined by an x and y variable. So essentially what I would like to obtain is a "row" of histograms as produced by the plot.hist function, stacking them next to one another in a single 3D plot. For

Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-29 Thread Adam
On Wed, Apr 29, 2009 at 8:29 AM, John Hunter wrote: > > > On Wed, Apr 29, 2009 at 9:07 AM, keflavich wrote: >> >> Since there don't seem to be any forthcoming answers, I have a somewhat >> different question.  In the matplotlib FAQ, it states that using 'show()' >> puts you in the GUI mainloop >>

Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 9:07 AM, keflavich wrote: > > Since there don't seem to be any forthcoming answers, I have a somewhat > different question. In the matplotlib FAQ, it states that using 'show()' > puts you in the GUI mainloop > (http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show

Re: [Matplotlib-users] Interactive backends very (suprisingly?) slow for multiple subplots

2009-04-29 Thread keflavich
Since there don't seem to be any forthcoming answers, I have a somewhat different question. In the matplotlib FAQ, it states that using 'show()' puts you in the GUI mainloop (http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show). However, using plot commands on the ipython command line

Re: [Matplotlib-users] Matplotlib documentation

2009-04-29 Thread John Hunter
On Wed, Apr 29, 2009 at 2:55 AM, Gökhan SEVER wrote: > > I would like discuss these point before start working on other api > functions and classes. Also need some explanation about them, since > pyplot is composed of functions but some other api's are mixed with > classes and functions. > > Plea

Re: [Matplotlib-users] Another Gnuplot style question

2009-04-29 Thread Matthias Michler
Hello Eric, Hello list, a year ago I also encountered the problem of "one file - one figure" of the plotfile function. I would like to propose an addional functionality of using one figure and several files in plotfile, because sometimes I don't want to read data myself. I added a patch includi

Re: [Matplotlib-users] Another Gnuplot style question

2009-04-29 Thread Joseph Smidt
Thanks everyone, this is exactly what I wanted. -- Joseph Smidt Physics and Astronomy 4129 Frederick Reines Hall Irvine, CA 92697-4575 Office: 949-824-3269

Re: [Matplotlib-users] Matplotlib documentation

2009-04-29 Thread Gökhan SEVER
Hello, About two months ago I was asking how to implement the following functionality for matplotlib documentation. Well today I figured it out :) I was busy with some other school work not been thinking for over twom months :P "Is there a way to get functions separately listed under each bookmar

Re: [Matplotlib-users] Another Gnuplot style question

2009-04-29 Thread Eric Firing
Joseph Smidt wrote: > Okay, I am another gnuplot user trying to migrate over to matplotlib. > I like what I see, but there are a couple things that are very easy to > do in Gnuplot that I can't figure out how to do with matplotlib. > > I have a file with 3 columns of data called data.txt that look

Re: [Matplotlib-users] Another Gnuplot style question

2009-04-29 Thread Sandro Tosi
On Wed, Apr 29, 2009 at 08:20, Joseph Smidt wrote: > 1. Both graphs overlayed on the same plot. > 2. Semilogy. (log y values), > 3. Only ploy for x in the range 2-3. > 4. Legend for the two graphs on same plot. a simple example: In [2]: import numpy as np In [3]: import matplotlib.pyplot as plt