Re: [Matplotlib-users] Continent Transparency

2012-04-26 Thread Bruce Ford
. Jacksonville, FL 32211 Skype: bruce.w.ford On Thu, Apr 26, 2012 at 3:41 PM, Jeff Whitaker wrote: > On 4/24/12 7:39 AM, Bruce Ford wrote: > >> All, >> >> I often produce images for use in .KML with Google Earth. Sometimes I >> need the masking effect of

[Matplotlib-users] Continent Transparency

2012-04-24 Thread Bruce Ford
All, I often produce images for use in .KML with Google Earth. Sometimes I need the masking effect of matplotlib.toolkits.basemap.Basemap.fillcontinents but in the case of Google Earth, I need to make continents transparent on the final image. Any ideas on how to do this? Thanks! Bruce --

Re: [Matplotlib-users] Map projections and pyplot.plot

2011-12-01 Thread Bruce Ford
c.com http://www.ClearScienceInc.com http://www.facebook.com/clearscience http://www.twitter.com/ROVs_rule Phone: (904) 796-8101 Fax: (904) 379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford On Thu, Dec 1, 2011 at 12:35 PM, Jeff Whitaker wrote: > On 12/1/11 7:34 AM, Bru

[Matplotlib-users] Map projections and pyplot.plot

2011-12-01 Thread Bruce Ford
I have a basemap figure where data is placed atop, which can be in any number of differing projections. However, when I plot a line over it using pyplot.plot, the line doesn't show unless I'm using the cylindrical equidistant projection. >From what I gather this is a limitation of the plot comman

Re: [Matplotlib-users] Division gotcha?

2011-08-29 Thread Bruce Ford
, Aug 28, 2011 at 4:03 PM, Bruce Ford wrote: > Getting a strange result trying to divide two 3d arrays.  I am getting > a matrix of NaNs regardless of how I divide and I can't determine why. > > #opened a NetCDF file using python-netcdf4 > > var1 = nc_file.variables['va

[Matplotlib-users] Division gotcha?

2011-08-28 Thread Bruce Ford
Getting a strange result trying to divide two 3d arrays. I am getting a matrix of NaNs regardless of how I divide and I can't determine why. #opened a NetCDF file using python-netcdf4 var1 = nc_file.variables['var1'] ###shape = [31,181,360] with a values ranging from 0 - 243 and NO NaNs in the

Re: [Matplotlib-users] Ordering contourf within a range

2011-08-12 Thread Bruce Ford
That's exactly it! Thanks guys! Bruce --- Bruce W. Ford Clear Science, Inc. br...@clearscienceinc.com http://www.ClearScienceInc.com http://www.facebook.com/clearscience http://www.twitter.com/ROVs_rule Phone: (904) 796-8101 Fax: (904) 379-9704 8241 Parkridge

[Matplotlib-users] Ordering contourf within a range

2011-08-12 Thread Bruce Ford
In plotting the figure in the below code, I need to set the colorbar and contourf scale to a specific value range (e.g., -100 to 100). When plotting similar items, I need to ensure the scale is the same across multiple images for comparison and overide the autoscaling. Any ideas? Seems like it s

Re: [Matplotlib-users] Nested grids

2011-06-07 Thread Bruce Ford
p://www.ClearScienceInc.com http://www.facebook.com/clearscience http://www.twitter.com/ROVs_rule Phone: (904) 796-8101 Fax: (904) 379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford On Tue, Jun 7, 2011 at 1:06 AM, Benjamin Root wrote: > On Monday, June 6, 2011, Bruce

[Matplotlib-users] Nested grids

2011-06-06 Thread Bruce Ford
Does anyone have an example of nested grids. I need to (for instance), plot a global grid in filled contours, then plot another, higher resolution grid over the US. The global grid could work something like this, but I'm not sure where to start with the 2nd (nested) grid to go atop. fig=plt.figur

Re: [Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Bruce Ford
I brute-forced this another way by dealing the arrays I had created. Thanks for the suggestions! --- Bruce W. Ford Clear Science, Inc. On Wed, Feb 9, 2011 at 10:30 AM, Jeff Whitaker wrote: > On 2/9/11 7:51 AM, Bruce Ford wrote: > > I am attemptin

[Matplotlib-users] Plotting multi-colored lines atop basemap instances

2011-02-09 Thread Bruce Ford
I am attempting to plot a line atop a basemap instance called "m". I can do this without a problem with: plot = m.plot(lon,lat,'r-') #lon and lat are lists However, I'd like to color the line based on a third list called "intensity." For instance, if the value of intensity between two points i

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Bruce Ford
eford On Fri, Aug 20, 2010 at 4:44 PM, Eric Firing wrote: > On 08/20/2010 10:14 AM, Bruce Ford wrote: >> This effect is happening within an web app that displays gridded >> fields from multiple datasets (~4500 lines of code).  So I it's tricky >> to create an exampl

Re: [Matplotlib-users] Colorbar labeling

2010-08-20 Thread Bruce Ford
-- Bruce W. Ford Clear Science, Inc. br...@clearscienceinc.com http://www.ClearScienceInc.com http://www.facebook.com/clearscience http://www.twitter.com/ROVs_rule Phone: (904) 796-8101 Fax:  (904) 379-9704 8241 Parkridge Circle N. Jacksonville, FL  32211 Skype:  bruce.w.ford ---

[Matplotlib-users] Colorbar labeling

2010-08-20 Thread Bruce Ford
I have a grid with values ranging from exactly 0.0 and 100.0. When I plot this with colorbar, the base of the colorbar is labeled "-0.0". Is this a default for 0.0...to plot it with as a negative number? Any workarounds? Bruce --- Bruce W. Ford Clear Science,

Re: [Matplotlib-users] Cmap creation

2010-04-02 Thread Bruce Ford
if any. plt.suptitle('Custom Blue-Red colormaps') plt.show() --- Bruce W. Ford Clear Science, Inc. br...@clearscienceinc.com bruce.w.ford@navy.smil.mil http://www.ClearScienceInc.com Phone/Fax: 904-379-9704 8241 Parkridge Circle N. Jacksonville,

[Matplotlib-users] Cmap creation

2010-04-01 Thread Bruce Ford
I'm running into walls trying to create a custom cmap. Running the example custom_cmap.py unchanged, I get : AttributeError: 'module' object has no attribute 'register_cmap' args = ("'module' object has no attribute 'register_cmap'",) I've included custom_cmap.py below. It's a major short

[Matplotlib-users] Transparencies for land and sea

2010-03-05 Thread Bruce Ford
Has anyone had any success in making land or sea locations transparent in a resulting .png? There are instances when I would like an image to be overlayed on a map and let the underlying terrain map show through. Using an image as a ground overlay in Google Earth would be an example of such a usa

Re: [Matplotlib-users] Producing a KML-friendly (Google Earth) image

2010-03-03 Thread Bruce Ford
Talk: for...@gmail.com On Wed, Mar 3, 2010 at 10:27 AM, Jeff Whitaker wrote: > Bruce Ford wrote: >> >> All, >> >> It took a fair bit of trial and error to coax a KML-friendly image out >> of matplotlib and to understand what was and was not necessary.  Below &g

[Matplotlib-users] Producing a KML-friendly (Google Earth) image

2010-03-03 Thread Bruce Ford
All, It took a fair bit of trial and error to coax a KML-friendly image out of matplotlib and to understand what was and was not necessary. Below is a demo script demonstrating how to accomplish a KML-friendly image with and without a basemap. I hope this will help someone out. What do I mean b

[Matplotlib-users] PNG images and image area

2010-02-23 Thread Bruce Ford
I'm attempting to output an image with a predictable bounding box so that it can be placed into a KML document and be correctly georeferenced. Essentially I need a PNG that has NO labeling and the size of the image be exactly the size of the plot bounding box and no more, no less. I can get exact

[Matplotlib-users] A second copy of a figure

2010-02-23 Thread Bruce Ford
I'm needing to keep two copies of a figure, with the properties different on one copy. However with logic like below, both copies remain the same regardless: #I want one copy with the defaul background and one to be transparent... imgname = GenFilename(20)+".png" imgsrc = "../dynamic/"+i

Re: [Matplotlib-users] Selectable contour(f) divisions

2010-02-12 Thread Bruce Ford
[-0.2, 0.0, 0.2, 0.4, 0.6, 0.8]) > > Kind regards, > Matthias > > On Thursday 11 February 2010 21:58:15 Bruce Ford wrote: >> In using the contour as in: >> >> contour(X,Y,Z,N) >> >> N is a number of automatically chosen levels. >> >> I would li

[Matplotlib-users] Selectable contour(f) divisions

2010-02-11 Thread Bruce Ford
In using the contour as in: contour(X,Y,Z,N) N is a number of automatically chosen levels. I would like to contour based on data divisions. For instance, perhaps I'd like to use a contour or color-fill (contourf) every 2 units. I'm not seeing how to accomplish this. Any points in the right di

[Matplotlib-users] suptitle interfering with figure

2009-12-16 Thread Bruce Ford
Using the code below, I'm placing a second title on a figure. However this title is placed over the figure and does not adjust the figure placement for the title. Is there a way to adjust the placement of the figure further down? I'm not seeing any such setting. pyplot.suptitle(MakeTitle