Re: [Matplotlib-users] Gradient color on a line object

2009-09-26 Thread Gökhan Sever
On Sat, Sep 26, 2009 at 10:16 PM, Jae-Joon Lee wrote: > The gradient, in general, is not supported by matplotlib yet. > If you're only interested in raster format outputs (like png), I > think you can use agg_filter functionality (but you need svn version > of mpl). > Could you give me a pointe

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Gökhan Sever
On Sat, Sep 26, 2009 at 11:14 PM, Jae-Joon Lee wrote: > On Sat, Sep 26, 2009 at 11:10 PM, Gökhan Sever > wrote: > > To run the code, you have to get nasafile.py and add this into your > > PYTHONPATH, later get dccn_plot.py and > > 09_03_26_11_36_15.dmtccnc.combined.raw file. nasafile.py has the

Re: [Matplotlib-users] plot of 2D array without masked values?

2009-09-26 Thread Jae-Joon Lee
On Mon, Sep 21, 2009 at 10:32 AM, Christian Meesters wrote: > Hi, > > I'm plotting 2D-ndarrays with pylab.pcolor(). The data contain masked > values and it can happen that entire rows or columns hold only masked > values. Is there a build-in way to omitted such rows/columns? Currently > I'm removi

Re: [Matplotlib-users] annotating in matshow

2009-09-26 Thread Jae-Joon Lee
Try something like below (there may be better ways to iterate over indices but the below is what I can think of now). -JJ idxy, idxx = np.indices(tmat.shape) for ix, iy in zip(idxx.flat, idxy.flat): text(ix-0.5, iy+0.5, "%4.1f"%tmat[iy, ix], fontsize=12,color='b',name='serif') On T

Re: [Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Jae-Joon Lee
On Sat, Sep 26, 2009 at 11:41 PM, Phillip M. Feldman wrote: > Re. working on the documentation: I'd be happy to contribute.  How do I edit > the docs? While it is best to submit a patch against svn, http://matplotlib.sourceforge.net/faq/howto_faq.html?highlight=contribute#contribute-to-matplotli

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Jae-Joon Lee
On Sat, Sep 26, 2009 at 11:10 PM, Gökhan Sever wrote: > To run the code, you have to get nasafile.py and add this into your > PYTHONPATH, later get dccn_plot.py and > 09_03_26_11_36_15.dmtccnc.combined.raw file. nasafile.py has the NasaFile > class to read this ascii file. > > run as ./dccn_plot.p

Re: [Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Phillip M. Feldman
I downloaded the latest version of EPD and installed, and register_cmap now works. Thanks! Re. working on the documentation: I'd be happy to contribute. How do I edit the docs? Phillip Jae-Joon Lee wrote: > It seems that you're using an older version of matplotlib. > register_cmap is availab

Re: [Matplotlib-users] Gradient color on a line object

2009-09-26 Thread Jae-Joon Lee
The gradient, in general, is not supported by matplotlib yet. If you're only interested in raster format outputs (like png), I think you can use agg_filter functionality (but you need svn version of mpl). Other wise, I guess your best bet is to divide you line into many segments and color them dif

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Gökhan Sever
On Sat, Sep 26, 2009 at 9:58 PM, Jae-Joon Lee wrote: > As specified in the doc > > > http://matplotlib.sourceforge.net/api/axis_api.html?highlight=get_majorticklabels#matplotlib.axis.Axis.get_majorticklabels > > it returns a list of Text instances. You may use > > > http://matplotlib.sourceforge.

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Gökhan Sever
On Sat, Sep 26, 2009 at 9:50 PM, Jae-Joon Lee wrote: > On Fri, Sep 25, 2009 at 1:14 AM, Gökhan Sever > wrote: > > With twin and proper Affine2D transformation I could not make the > secondary > > y-axis data being shown on the figure. > > Please post a simple, complete code that does not work. >

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Jae-Joon Lee
As specified in the doc http://matplotlib.sourceforge.net/api/axis_api.html?highlight=get_majorticklabels#matplotlib.axis.Axis.get_majorticklabels it returns a list of Text instances. You may use http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.text.Text.get_text to retrieve the

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Jae-Joon Lee
On Fri, Sep 25, 2009 at 1:14 AM, Gökhan Sever wrote: > With twin and proper Affine2D transformation I could not make the secondary > y-axis data being shown on the figure. Please post a simple, complete code that does not work. Just saying "it didn't work" does not help. I think the following ch

Re: [Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Phillip M. Feldman
Ah! I have version 9.98.5. Thanks very much! Phillip Ryan May wrote: > On Sat, Sep 26, 2009 at 8:27 PM, Dr. Phillip M. Feldman > wrote: > >> When I try to import register_cmap from matplotlib, matplotlib.colors, or any >> of the other likely candidate modules in which it might be contained,

Re: [Matplotlib-users] patchcollection wihtout edgecolor and gradient filled patches

2009-09-26 Thread Jae-Joon Lee
On Fri, Sep 25, 2009 at 8:53 AM, Leopold Stadler wrote: > Is there some simple solution to draw a patch collection with no edges or to > set the edgecolor to the > facecolor? I believe that for single polygons the color = XY comand should > work. > While I believe that setting linewidth=0 will

[Matplotlib-users] Gradient color on a line object

2009-09-26 Thread Gökhan Sever
Hello, Is it possible use a gradient color say from blue to red and/or specifying certain color threshold for a line plot (i.e I have air temperature plotted and I want to segment the color of the plot for temp > 0C red, and below 0 make it blue.) Would be much nicer with gradient however I am co

Re: [Matplotlib-users] Two questions...

2009-09-26 Thread Gökhan Sever
First the first part, my understanding is if twiny() could accept tranforms this like twin() this issued might be resolved. When I use twin() and transforms with different scaled data sources, I can't get one of them being plotted correctly. Just FYI, Maybe someone can further look into this. Th

Re: [Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Ryan May
On Sat, Sep 26, 2009 at 8:27 PM, Dr. Phillip M. Feldman wrote: > > When I try to import register_cmap from matplotlib, matplotlib.colors, or any > of the other likely candidate modules in which it might be contained, I get > a "cannot import" error.  It would be great if the documentation indicate

Re: [Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Jae-Joon Lee
It seems that you're using an older version of matplotlib. register_cmap is available in the current version of mpl, which is 0.99.1. And the example works fine. While it is best if the documentation states which functionality became available at which version, unfortunately it is not. If you want

[Matplotlib-users] where does register_cmap come from?

2009-09-26 Thread Dr. Phillip M. Feldman
When I try to import register_cmap from matplotlib, matplotlib.colors, or any of the other likely candidate modules in which it might be contained, I get a "cannot import" error. It would be great if the documentation indicated how to import this and provided at least one working example. -- Vie

Re: [Matplotlib-users] Custom colormaps

2009-09-26 Thread Dr. Phillip M. Feldman
When I try to access that Wiki, I get the following message: This page does not exist yet. Check this wiki item and the associated mailing list thread: http://www.scipy.org/wikis/topical_software/LoadingAColormapDynamically -- View this message in context: http://www.nabble.com/Custom-colorm

[Matplotlib-users] sample colormap code is broken

2009-09-26 Thread Dr. Phillip M. Feldman
When I try to run the sample custom colormap code provided at http://matplotlib.sourceforge.net/examples/pylab_examples/custom_cmap.html , I get the following error message: AttributeErrorTraceback (most recent call last) colormaps.py in () 114 115 blue_red2 = LinearSegmentedColo

[Matplotlib-users] can't use custom color maps

2009-09-26 Thread Dr. Phillip M. Feldman
I'd like to be able to create and use a custom colormap. I'm creating the colormap via the following statement: matplotlib.colors.ListedColormap([(0,0,0),(0.6,0,0),(0,0.6,0),(0.6,0.6,0)], name='Earth') The above statement appears to work, but when I attempt to use this colormap, I get the err