I am plotting spherical coordinates using R's sphereplot
package (depends on rgl
plackage) with the function rgl.sphgrid
. I am able to plot my data, but the default for the plotting setup is to have the degrees longitude go counterclockwise around the equator if one is looking down from above the North Pole. As a result, my data points which ought to be on the left side are on the right side, and vice versa. So, again if one is looking down from the North Pole, by default the 0 is at the top, 90 to the left, 180 at the bottom and 270 at the right. Is there a way to flip this so the degrees go around clockwise? I have been searching but haven't found one yet.
sampledata <- read.csv(file.choose(), header=FALSE)
rgl.sphgrid(radius = 1, col.long='red', col.lat='blue', deggap = 30,
longtype = "D", add = FALSE, radaxis = FALSE)
rgl.sphpoints(sampledata, deg = TRUE, col='black')
sampledata
long. lat. radius
180 15 1
170 10 1
160 -20 1
150 -15 1