Re: [Matplotlib-users] discrete non-uniform intervals colorbar

2007-11-02 Thread Hyungjun Kim
Dear folks, I tried to plot a colored map with non-uniformed discrete colorbar and found a few threads related with this. However, I could not find a way to apply non-uniformed discrete colorbar over imshow or pcolor. Would anybody give me a clue? Thanks in advance. Kim Eric Firing wrote: >

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Jeff Whitaker
Michael Hearne wrote: > Jeff - > > My data set is actually dynamically generated by a program called > ShakeMap. It's a 2D grid, with an extent usually about 600 kilometers > on a side, centered wherever the earthquake happened to be. The > ShakeMap program does not know or care that some of

Re: [Matplotlib-users] Grid Shifting in PS backend

2007-11-02 Thread Darren Dale
On Thursday 25 October 2007 03:17:05 pm David D Clark wrote: > Hello folks, > > I have a Gaussian peak centered on zero. When the plot is drawn on > screen with the GTKAgg backend, the peak is shown in the correct place. > When I either click on the disk icon and save the plot as eps or use > sav

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
Jeff - My data set is actually dynamically generated by a program called ShakeMap. It's a 2D grid, with an extent usually about 600 kilometers on a side, centered wherever the earthquake happened to be. The ShakeMap program does not know or care that some of the data may be under water,

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Pierre GM
On Friday 02 November 2007 15:10:15 Michael Hearne wrote: > Is there an easy way to do this with matplotlib/basemap tools? I'm afraid that not. Your problem is that you need to find for each cell of your gridded data whether you are on land or in an ocean, and mask the corresponding cell in the

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Jeff Whitaker
Michael Hearne wrote: > 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, a

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
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 missi

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Jeff Whitaker
Michael Hearne wrote: > Thanks for the reponses so far, but I lied. I have more questions :) > > 1) How do I get drawmeridians() and drawparallels() to draw solid > (i.e., not dashed) lines? setting linestyle='-' does not seem to work. Mike: From the docstring: "dashes - dash pattern for p

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Jeff Whitaker
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 w

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
Pierre - That's great. As soon as I get the zorder problem figured out (can't have land AND ocean masks on!) , I'll give your solution a try. One question regarding - I found this page: http://trac.osgeo.org/gdal/wiki/GdalOgrInPython but it wasn't immediately apparent how to _get_ it. Do I

Re: [Matplotlib-users] Basemap questions

2007-11-02 Thread Pierre GM
On Friday 02 November 2007 11:51:55 Michael Hearne wrote: > 2) Has anyone figured out a way to make an _ocean_ mask? I need my > map to look like this Assuming that you have gdal installed, you can use this set of functions. Basically, you use OGR to compute the differences between the backgroun

[Matplotlib-users] Basemap questions

2007-11-02 Thread Michael Hearne
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