# [R] 3D plot with coordinates

Alaios alaios at yahoo.com
Wed Jun 21 15:16:53 CEST 2017

```Thanks Duncan for the replyI can not suppress anything these are radiation pattern measurements that are typically are taken at X,Y and Z planes. See an example here, where I want to plot the measurements for the red, green and blue planes (so the image below withouth the 3d green structure inside)https://www.researchgate.net/publication/258391165/figure/fig7/AS:322947316240401@1454008048835/Radiation-pattern-of-Archimedean-spiral-antenna-a-3D-and-b-elevation-cuts-at-phi.png

I am quite confident that there is a tool in R to help me do this 3D plot, and even better rotatable.
Thanks for the reply to allAlex

On Wednesday, June 21, 2017 1:07 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:

On 21/06/2017 5:23 AM, Alaios via R-help wrote:
> Thanks a lot for the reply.After  looking at different parts of the code today I was able to start with simple 2D polar plots as the attached pdf file.  In case the attachment is not visible I used the plot.polar function to create something like that.https://vijaybarve.files.wordpress.com/2013/04/polarplot-05.png
> Now the idea now will be to put three of those (for X,Y,Z) in a 3d rotatable plane. I tried the rgl function but is not clear how I can use directly polar coordinates to draw the points at the three different planes.
> Any ideas on that?

You can't easily do what you're trying to do.  You have 6 coordinates to
display:  the 3 angles and values corresponding to each of them.  You
need to suppress something.

If the values for matching angles correspond to each other (e.g. x=23
degrees and y=23 degrees and z=23 degrees all correspond to the same
observation), then I'd suggest suppressing the angles.  Just do a
scatterplot of the 3 corresponding values.  It might make sense to join
them (to make a path as the angles change), and perhaps to colour the
path to indicate the angle (or plot text along the path to show it).

Duncan Murdoch

> Thanks a lot.RegardsAlex
>
>    On Tuesday, June 20, 2017 9:49 PM, Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote:
>
>
>  package rgl.
>
> Best,
> Uwe Ligges
>
>
> On 20.06.2017 21:29, Alaios via R-help wrote:
>> HelloI have three x,y,z vectors (lets say each is set as  rnorm(360)). So each one is having 360 elements each one correpsonding to angular coordinates (1 degree, 2 degrees, 3 degrees,.... 360 degrees) and I want to plot those on the xyz axes that have degress.
>> Is there a function or library to look at R cran? The ideal will be that after plotting I will be able to rotate the shape.
>> I would like to thank you in advance for your helpRegardsAlex
>>    [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
>
>
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help