google map tile creation & cutting with Gr
Arlindo da Silva
dasilva at ALUM.MIT.EDU
Mon Sep 15 23:22:47 EDT 2008
On Mon, Sep 15, 2008 at 9:51 PM, P.Romero <romero619 at hotmail.com> wrote:
> Hello again,
> Ok, so Im trying to test using pygrads to produce the Mercator plots.
Do you really need Mercator plots for GoogleEarth?
>
> I need help figuring out how to disable:
> 1) color bar
> 2) gridlines
> 3) axes, ticks, etc.
> 4) set the bounds of the Mercator projection(right now, it keeps plotting
> the full earth)
Read the basemap documentation and see if there is any restriction on the
mercator projection (I don't known from the top of my head). I haven't used
this projection.
> 5) control the plot size (its defaults to producing a very tall & thin
> graph)
> 6) draw the hi-res continental outlines, and fill them with a specific
> color
>
Look at method implain() in galab.py which disables most of this. Look at
the examples that comes with the basemap distribution to learn how to fill a
hi res map with a specific color. (These examples will also give you a much
better sense of what can be accomplished with this very powerful package).
For maximum flexibility you may want to extract data from grads and call the
native matplotlib/basemap functions.
> 6) extra/optional: is it possible to print to png with a transparent color
> set? Similar to printim in GrADS?
>
Actually, you can control transparency on a color by color basis (rather
than having a single transparent color as in printim). You just create a
colormap where each color can now have an extra channel (r,g,b,a) - "a" is
the alpha channel and its value controls the transparency level. Take a look
at gacm.py to see how transparent color tables are created.
> Can you please give me some help/tips on how to control these settings in
> pyGrads?
Much this functionality comes from Matplotlib and the basemap toolkit. Start
by doing some reading on these packages.
Arlindo
--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080915/e7476ca6/attachment.html
More information about the gradsusr
mailing list