[R] plotting data in non-orthogonal coords.

Andreas Franke stu44414 at mail.uni-kiel.de
Tue Nov 30 11:06:59 CET 2004


Am Dienstag, 30. November 2004 10:26 schrieb Petr Pikal:
> Hallo Andreas
>
> There is probably no one who can give you some answer as you
> did provide almost no facts what you really did and what is wrong.
> You probably need to transform your coordinates to orthogonal
> and plot them as you wish. But you have to do it yourself.
>
> I had some data in polar coordinates some time ago and I did the
> same (see attached picture).
>
> Cheers
> Petr
>
> On 29 Nov 2004 at 14:29, Andreas Franke wrote:
> > Hi !
> > I am wondering how to plot data (e.g.  f(x,y) ) in a coordinate system
> > spanned by two non-orthogonal basis vectors (e.g. hexagonal symmetry).
> > The data is given on an equally spaced grid in theses coords and i
> > would like to do a contour plot (e.g. with filled.contour).
> >
> > Thanks for your help. Andreas
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
>
> Petr Pikal
> petr.pikal at precheza.cz

Hi !
Thanks for replying to my post and sorry for not being specific enough.
Maybe I am the one who didnt get the point , but as far as I understand R 
plots filled.contour(x,y,z,...) in the following way:

x,y define a grid in cartesian coords, i.e. the angle between x and y is 90°. 
So if I have data on such a grid I am fine.
My data is on an equally spaced grid in a coordsystem where x and y are at an 
angle of 60°. If you transform into cartesiancoords this isnt an equally 
spaced grid anymore.  You could interpret it as an equally spaced grid on 
which there is only data given on every second grid point.

It would be nice if one could just plot data given as F(x,y) where you supply 
x and y for every data point seperatly so that you dont need any specific 
grid.

I hope that someone can help.
Thanks in advance. Andreas




More information about the R-help mailing list