Re: [Matplotlib-users] color xy plot

2010-10-26 Thread John [H2O]
Bringing up an old thread, but just curious if this can be done with the plot command as well, as in: plt.plot(X,Y[1:3,:].T,c=['blue','red']) Thanks, john sordnay wrote: John Hunter-4 wrote: On Fri, Jun 20, 2008 at 6:14 PM, sordnay sord...@gmail.com wrote: Hi all, I'm trying to plot

[Matplotlib-users] Axes3D and basemap

2010-03-02 Thread John [H2O]
Has anyone ever used a basemap instance as the 'floor' of an Axes3D plot? What I'm looking for is example code to do something like this: http://www.dfanning.com/tips/scatter3d_on_map.jpg Thanks, john -- View this message in context:

[Matplotlib-users] function to create netcdf file

2009-11-11 Thread John [H2O]
Hello, I'm trying to write a function to create a 'vanilla' NetCDF file to which I can add data. So far I have created the following, which is designed to set up a netcdf file for the addition of global or at least lat/lon datasets. My question has to do with attribute setting. Is it valid to do

[Matplotlib-users] Plotting MODIS data in Python / basemap - a MODIS workflow solution?

2009-10-27 Thread John [H2O]
Hello, Recently I read a clear and helpful blog entry by Christian Perone (author of pyevolve): http://pyevolve.sourceforge.net/wordpress/?p=86 I asked him if he had a solution for plotting standard MODIS hdf products available here: http://rapidfire.sci.gsfc.nasa.gov/realtime/2009300/ In more

Re: [Matplotlib-users] Plotting MODIS data in Python / basemap - a MODIS workflow solution?

2009-10-27 Thread John [H2O]
Jose Gómez-Dans-2 wrote: Really, it's what you want to do with your MODIS data. My workflow is usually as follows: 1.- Access MODIS data (and ancillary stuff, such as QA flags etc) using Python's GDAL bindings. 2.- Manipulate the MODIS data from (1) using numpy, scipy. If there's

Re: [Matplotlib-users] graphs in memory

2009-10-14 Thread John [H2O]
Bas, Send an example of how you're handling the plotting. I have had similar issues, but I've finally figured out how to work around it. Basically, look at the Object Oriented examples, rather than using pyplot. What I found to be most efficient was to reuse figures as much as possible, but

Re: [Matplotlib-users] basemap, transform_scalar question

2009-10-07 Thread John [H2O]
Whitaker wrote: John [H2O] wrote: I'm trying to 'automate' a few components within basemap. I have a pretty complicated, and assuredly poorly written, set of functions that allow me to 'dynamically' plot a grid of data (lon,lat). Here is one section where I try to deal with transforming

[Matplotlib-users] basemap, transform_scalar question

2009-09-28 Thread John [H2O]
I'm trying to 'automate' a few components within basemap. I have a pretty complicated, and assuredly poorly written, set of functions that allow me to 'dynamically' plot a grid of data (lon,lat). Here is one section where I try to deal with transforming the data based on the projection. 'data'

Re: [Matplotlib-users] trailing space in text string stripped, making it impossible to right-pad my text

2009-09-28 Thread John [H2O]
Christopher Barrington-Leigh wrote: Hello. My problem is as follows: (ipython --pylab) from pylab import * pp=plot([0,0],[1,1]) text(xlim()[0],1,'Need padding ',horizontalalignment='left') text(xlim()[1],1,'Need padding ',horizontalalignment='right') The second case

Re: [Matplotlib-users] Update a contour plot

2009-09-28 Thread John [H2O]
Ralph Kube-2 wrote: Is there an easy way out? Well, you could just script it and create .png files I do it all the time. -- View this message in context: http://www.nabble.com/Update-a-contour-plot-tp25648878p25653140.html Sent from the matplotlib - users mailing list archive

[Matplotlib-users] colorbar tick label fontproperties

2009-09-22 Thread John [H2O]
Could someone please explain how to change the font properties for a colorbar tick label, the following causes no error, but it does NOT work: ## CREATE COLORBAR ## make a copy of the image object im2 = copy.copy(im) im2.set_cmap(colmap) ## create new axis for colorbar.

[Matplotlib-users] circle collection get_facecolors in Basemap

2009-09-22 Thread John [H2O]
Hello, I'm trying to plot text objects with the color used in m.scatter. My goal is to individually label each scatter object. I've tried the following: circles=m.scatter(cx,cy,zsize,zlevel,cmap=cmap) and then: CC = circles.get_facecolor() i=0 for x,y in map(cx,cy): ax.text(x,y,'some

Re: [Matplotlib-users] logarithmic colormaps for imshow

2009-09-11 Thread John [H2O]
Must be something about asking the right question... This works perfectly. For those interested, my code is now as: dmn = 0.1 dmx = 100 logspace = 10.**np.linspace(dmn, dmx, 100) clevs = logspace colmap = pyplot.get_cmap('gist_ncar') im =

[Matplotlib-users] logarithmic colormaps for imshow

2009-09-10 Thread John [H2O]
In mpl_toolkits.basemap there is a module cm. I have been using the cm.s3pcpn colormap for some plots which require logarithmic coloring. The cm.s3pcpn_l colormap is also available (apparently a linear version). I wanted to know whether there were any other logarithmic colormaps available...

Re: [Matplotlib-users] pylab

2009-08-11 Thread John [H2O]
Just an thought regarding the whole PyLab concept... import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. [snip]... If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good

Re: [Matplotlib-users] re grid non regular data, then mask for continents / artifacts

2009-08-11 Thread John [H2O]
Impatiently I somewhat double posted (though, actually, I thought this was a better list than scipy for the question). Regardless... the conversation is mostly here: http://www.nabble.com/2d-interpolation%2C-non-regular-lat-lon-grid-td24909685.html -- View this message in context:

[Matplotlib-users] rotating labels, what is wrong?!

2009-07-20 Thread John [H2O]
I am trying simply to shrink the font size and rotate xaxis labels: fig1 = plt.figure() ax1 = fig1.add_subplot(211) ax2 = fig1.add_subplot(212) ax1.plot_date(x,y,'r') ax1.set_xticklabels(plt.gca().get_xmajorticklabels(), size=6,rotation=30)

Re: [Matplotlib-users] rotating labels, what is wrong?!

2009-07-20 Thread John [H2O]
in a script it would be better to use the axis method, but apparently it is different from the gca() method. This is what I don't understand. Thanks! On Mon, Jul 20, 2009 at 11:48 AM, John [H2O]washa...@gmail.com wrote: I am trying simply to shrink the font size and rotate xaxis labels: fig1

Re: [Matplotlib-users] plotting 100's of figures, mpl slows and consumes memory!

2009-07-18 Thread John [H2O]
Below is what I am trying to do, perhaps I am doing something wrong somewhere? John Hunter-4 wrote: or explicitly reuse the same fig by giving a figure number and clearing it: for i in range(1000): fig = plt.figure(1) # plot something fig.cla() JDH My Program is

[Matplotlib-users] non interactive runs keep crashing due to DISPLAY

2009-07-17 Thread John [H2O]
Hello, I am trying to run a plotting script. I have my imports as such: from matplotlib import interactive interactive(False) import matplotlib.pyplot as plt But I am getting this error repeatedly: fig=figure(1,figsize=(8,6)) File /usr/lib/python2.6/dist-packages/matplotlib/pyplot.py,

Re: [Matplotlib-users] non interactive runs keep crashing due to DISPLAY

2009-07-17 Thread John [H2O]
John [H2O] wrote: My $DISPLAY variable does change from time to time, but as I have it set to interactive, why should this matter? I wanted to explain a little further. I have it set to interactive(False) sorry if there is confusion in my above statement. The reason my DISPLAY

[Matplotlib-users] plotting 100's of figures, mpl slows and consumes memory!

2009-07-17 Thread John [H2O]
I have a script looping through and plotting 100's of figures. It runs fine, but after the first few plots, the loop considerably slows down and the memory usage keeps going up. The script is quite complicated, so can't really paste it here, but I am trying to pass figure instances around and I

Re: [Matplotlib-users] question about setting colors of lines using colormap

2009-07-15 Thread John [H2O]
I also recently posted an example that may do something similar to what you are after, you can have a look here: http://www.nabble.com/contribute-to-gallery--Or%2C-just-advice-on-changing-colors-automagically-td24419101.html#a24427781 per freem-2 wrote: Hi all, i would like to set

Re: [Matplotlib-users] contribute to gallery? Or, just advice on changing colors automagically....

2009-07-10 Thread John [H2O]
vehemental wrote: Hi, I may be wrong, but arent these already examples of what you trying to show here?: http://matplotlib.sourceforge.net/examples/pylab_examples/line_collection2.html http://matplotlib.sourceforge.net/examples/pylab_examples/ellipse_collection.html if you use a

[Matplotlib-users] contribute to gallery? Or, just advice on changing colors automagically....

2009-07-09 Thread John [H2O]
Just curious if you're interested in folks contributing to the gallery. I was playing around trying to come up with a routine to automatically choose colors when plotting several datasets, not necessarily from a single array, but rather say iterating through a list of datasets. I came up with the

Re: [Matplotlib-users] GEOS Error

2009-04-18 Thread John [H2O]
What versions of python, numpy, matplotlib, basemap and the GEOS library do you have? -Jeff numpy - 1.2.0 matplotlib - 0.98.5.2 basemap - 0.99.3 As for GEOS version, not sure but I have these files in /usr/lib libgeos_c.so.1 libgeos.so.2

[Matplotlib-users] GEOS Error

2009-04-17 Thread John [H2O]
Does anyone know what this error may result from: GEOS_ERROR: TopologyException: no outgoing dirEdge found (74.5584,-90,-90) Segmentation fault I am getting it for various projections and datasets... working with mpl_toolkits.basemap Thanks! -- View this message in context:

[Matplotlib-users] plotting labels for each 'artist' in a basemap

2008-11-13 Thread John [H2O]
Hello, using matplotlib 0.98 with mpl_toolkit Basemap: I'm trying to create a plot with a series of ellipses over a map. I've followed the tutorial, and can create the same figure as shown here: http://matplotlib.sourceforge.net/users/screenshots.html#ellipses I can also create a series of

Re: [Matplotlib-users] Problems with imshow logarithmic plot

2008-10-27 Thread John [H2O]
, unfortunately, pcolor and pcolormesh don't support any kind of interpolation. (imshow does, but it can only draw uniform data). Mike John [H2O] wrote: Hello, I'm trying to get imshow to plot logarithmic data. I'm having some problems with the colorbar or data?? Note, I plot the max_dat

Re: [Matplotlib-users] Problems with imshow logarithmic plot

2008-10-27 Thread John [H2O]
I should add here also, this doesn't explain for me why the values are different?? Thoughts on that mtter? Thanks!! -- View this message in context: http://www.nabble.com/Problems-with-imshow-logarithmic-plot-tp20152686p20190717.html Sent from the matplotlib - users mailing list archive at

Re: [Matplotlib-users] Problems with imshow logarithmic plot

2008-10-27 Thread John [H2O]
, while the scatter point is being plotted with log scale...? John [H2O] wrote: I should add here also, this doesn't explain for me why the values are different?? Thoughts on that mtter? Thanks!! -- Michael Droettboom Science Software Branch Operations and Engineering Division

[Matplotlib-users] Problems with imshow logarithmic plot

2008-10-24 Thread John [H2O]
Hello, I'm trying to get imshow to plot logarithmic data. I'm having some problems with the colorbar or data?? Note, I plot the max_dat value on the bottom of the figure, but it does not seem to correspond with the values in the plot??? Any ideas? Also, does anyone have some recommendations on

[Matplotlib-users] Dropped mplot3d support? Any alternative?!

2008-10-08 Thread John [H2O]
I was discouraged to read recently on Scipy's Cookbook / Matplotlib / mplot3D entry: The examples below show simple 3D plots using matplotlib. matplotlib's 3D capabilities were added by incorporating John Porter's mplot3d module, thus no additional download is required any more, the following

Re: [Matplotlib-users] scipy, matplotlib import errors

2008-09-25 Thread John [H2O]
I wonder if I've misunderstood or made a mistake? I renamed a file: /usr/lib/python2.5/new.py to /usr/lib/python2.5/new.bak and everything worked... but now, after logging out and logging back in again, I'm getting the problem again? Perhaps that was the standard libraries module? But I cannot

Re: [Matplotlib-users] scipy, matplotlib import errors

2008-09-25 Thread John [H2O]
I'm revisiting this with a new round of errors. I keep getting this error, maybe related as before to the 'new' module, but I cannot tell?? Does anyone know what is going on? Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 Type help, copyright,