0

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
user1118321
  • 25,567
  • 4
  • 55
  • 86
mdhunstiger
  • 3
  • 1
  • 1
  • 3
  • 2
    It would be easier for everybody if you could provide a minimal reproducible example. –  Feb 25 '15 at 07:31
  • It is hardcoded. You probably need to write your own function based on `rgl.sphgrid`. –  Feb 25 '15 at 08:17
  • I just had a veeery brief look at the `rgl.sphgrid` code (just type it in the R console). There are some `seq`uences that might be `rev`ersed. – Henrik Feb 25 '15 at 09:41

0 Answers0