我想绘制日期,x和y在R中的3D图中(使用RStudio 0.99.903),R(3.3.2),scatterplot3d(0.3-40),rgl( 0.98.1)在3D图中绘制日期R
dates = c("2016-11-10","2016-11-20","2016-12-01","2016-12-15","2016-12-30")
x = rnorm(5,0,1)
y = rnorm(5,1,2)
A = data.frame(dates, x, y)
A$dates = as.Date(A$dates,"%yyyy-%mm-%dd")
library(scatterplot3d)
with(data=A, scatterplot3d(x=x,y=y,z=dates))
This plots the dates as integers
I also tried the rgl package, but get the same result.
library(rgl)
plot3d(x=A$x,y=A$y,z=A$dates)
'A $ dates = as.Date(A $ dates,“%Y-%m-%d”)' – Masoud
欢迎来到StackOverflow!请确保你包含一个特定的问题。 –