[R] curvilinear grid

hadley wickham h.wickham at gmail.com
Thu Sep 27 15:05:12 CEST 2007


On 9/26/07, tom sgouros <tomfool at as220.org> wrote:
>
> hadley wickham <h.wickham at gmail.com> wrote:
>
> > You might be able to do this with the ggplot2 package - see for
> > example http://had.co.nz/ggplot2/coord_map.html, which shows plots on
> > map coordinate systems.  Because the design of ggplot2 means the
> > coordinate system and geom (eg. points vs tiles) operate
> > independently, you can draw image plots
> > (http://had.co.nz/ggplot2/geom_tile.html) in any coordinate system.
>
> These aren't quite what I have in mind.
>
> > Can you provide more details about your curvilinear coordinate system?
>
> The idea is that you're modeling an irregular shaped object, a body of
> water, a river or estuary, say.  It's fairly common practice to use a
> grid squished and rotated so that the main flow is along one axis, and
> the other axis spans the flow in most spots.  So there is a single
> transformation that gets you from a rectangular grid to the shape of
> your estuary, but there isn't a tidy analytical way to describe it, like
> there is with a map projection.  Instead there is an x and y for each
> grid point, and the cell dimensions vary all over the place.

Ah, so you have grid quads points defined by the coordinates of their
corners?   You should be able to use the polygon geom in ggplot2 - if
you provided some example data I could get you started.

Hadley
-- 
http://had.co.nz/



More information about the R-help mailing list