Skip to content

3D plot with coordinates

5 messages · Alaios, Duncan Murdoch

#
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?
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XNoSink.pdf
Type: application/pdf
Size: 9099 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20170621/7fa22202/attachment.pdf>
#
On 21/06/2017 5:23 AM, Alaios via R-help wrote:
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 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 at 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:
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. So after searching 4 hours last night it looks like that there is no R package that can do this right now. Any other ideas or suggestions might be helpful.RegardsAlex
On Wednesday, June 21, 2017 3:21 PM, Alaios via R-help <r-help at r-project.org> wrote:
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 at 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:
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
? 
??? [[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
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
#
On 22/06/2017 3:15 AM, Alaios wrote:
I don't know what you want the display to look like, but if you want it 
to be rotatable, rgl is probably the right package to use.

It doesn't directly support the coordinate system you're using, so you 
need to figure out where you want your points (or line segments) plotted 
in Euclidean coordinates, and write your own function to plot those. 
For example, to plot (r, theta) in polar coordinates in the XY plane, 
use (x = r*cos(theta), y = r*sin(theta), z = 0).

Duncan Murdoch