0

I'm trying to add several line series with different colors to represent each line. I'm using OSX and RStudio 0.97.248

My code:

library(rgl)
x <- c(32.0672183,32.0672378,32.06729413,32.0683039,32.0674524,32.0673297,32.06724431,32.0674858,32.0682105)
y <- c(34.8408533,34.8408614,34.84103463,34.840861,34.8407371,34.8409077,34.84114677,34.840946,34.8410858)
z <- c(0,2,17,110,95,21,24,32,81)
a <- c(32.1672183,30.0672378,32.06729413,34.0683039,31.0674524,32.0373297,32.06724431,20.0674858,31.0682105)
b <- c(31.8408533,24.8408614,44.84103463,31.840861,30.8407371,30.8409077,24.84114677,34.840946,34.8410858)
c <- c(0,2,17,11,55,41,14,32,1)

lines3d(x,y,z,lwd=5, col="red") 
lines3d(a,b,c,lwd=5, col="blue", add=TRUE) 

The result is rather poor: sometimes it plots only one them, other times it plots two lines but the grid doesn't show.

Uwe
  • 41,420
  • 11
  • 90
  • 134
serj
  • 508
  • 4
  • 20

0 Answers0