Jeff - I looked at that example file, and I think there's a big difference - your etopo base data set is global, and you can plot over the data in the oceans by setting the mask on all pixels less than zero.

My dataset (a map of earthquake shaking) is not global, and actually has NO missing data. I think I need a way to "clip" the data by the land mask - that is, find all of the pixels that are NOT on land, and then mask them off.

Is there an easy way to do this with matplotlib/basemap tools?

Regarding my other issue - I used my script to test x/y offset values: [0.05,0.1,0.5,1.0,10] and couldn't see any difference. I'd be more than happy to provide test output, or debugging information...

Just to be clear - these offsets are supposed to move the meridian and/or parallel labels around with respect to the map edge? My actual goal is to get the labels inside the edge of the map (I tried negative numbers to accomplish this, to no effect.)

On a positive note, I _can_ make solid lines!

Thanks for all of your help,

Mike


On Nov 2, 2007, at 11:47 AM, Jeff Whitaker wrote:

Michael Hearne wrote:
I have two questions:

1) The fillcontinents() method has a zorder keyword parameter. Is this supposed to work with imshow()? I have the latest tarball from the website, and I can't get my image to paint on top of the continents.

2) Has anyone figured out a way to make an _ocean_ mask? I need my map to look like this ( http://earthquake.usgs.gov/eqcenter/pager/us/2007itah/us/5/ shakemap.600.jpg)

, where the image data (the yellow and orange bits) that extends out beyond the land boundary is masked by a blue ocean.

Thanks,

Mike
Mike: You can set the background color for the axes instance to blue, and then draw the filled continents over it.

You'll also have to make your image a masked array, and set the missing values to be transparent.

The basemap examples plotmap_masked.py shows how to do both of these things.

-Jeff
--
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg




------------------------------------------------------
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to