Hi,
I'm getting the following error when trying to create a plot with
matplotlib. I am using matplotlib-0.91.2 on CentOS 4 with python 2.3.
We are running it with mod_python and Apache in a web service
configuration.
File
"/usr/lib/python2.3/site-packages/matplotlib-0.91.2_r0-py2.3-linux-i686.eg
The prism colormap repeats the same pattern over and over instead of
spreading itself over the plotted data range in a pcolor plot. Is this
expected behavior?
Simply add prism() to pcolor_demo.py to see what I am talking about.
Thanks,
Rich
> Rich: You'll have to do it manually with the axes text method. The
> drawparallels method can only label them where they intersect the edge
> of the map.
>
Thanks Jeff, that's what I was afraid of.
New question: when adding axis labels (xlabel, ylabel) and figure title,
these overlap basem
Hi,
When using north/south polar stereographic projections from basemap, how
can I get labels to show up on the parallels when none of them intersect
a plot edge?
Thanks,
Rich
-
This SF.net email is sponsored by: Microsoft
Eric Firing wrote:
>
> The transforms can be modified at drawing time, so you need to get the
> pixel locations after the plot has been drawn. Are you doing this?
Eric,
Thank you! I put the transforms after savefig() and it works like a
champ now.
Rich
-
Rich Fought wrote:
> I'm plotting some grid data using pcolor, and trying to get canvas pixel
> locations of data points using the
>
> ax.transData.xy_tup()
>
> method. I am saving these figures to PNG files using the default Agg
> backend. When I open these image
I'm plotting some grid data using pcolor, and trying to get canvas pixel
locations of data points using the
ax.transData.xy_tup()
method. I am saving these figures to PNG files using the default Agg
backend. When I open these images up in Gimp and check the pixel
locations, the X pixel locat
> Rich: What are X and Y set to? They should be the map projection
> coorindates of the grid. If they are latitudes and longitudes, this
> will work for 'cyl' but not 'merc'. For 'merc', you must convert the
> lats and lons to x and y using
>
> x, y = mp(lon, lat)
>
> -Jeff
>
Thanks Jeff,
Hi,
I've successfully plotted gridded data on a basemap "cyl" projection
using pcolor:
mp = Basemap(projection="cyl", resolution="l", llcrnrlon=0.0,
urcrnrlon=30.0, llcrnrlat=-5.0, urcrnrlat=5.0)
pc = mp.pcolor(X, Y, zvalsm, cmap=cm.jet)
However, if I simply I change the projection type to m