我知道this question,其中dcarlsen很有帮助地解释了如何在r中围绕z轴旋转一个3 d散点图,但是,我也想绕x轴旋转。代码:
attach(dataset)
dateconverted <- as.Date(Date)
Status_converted <- as.factor(Vaccine_status)
age <- as.numeric(gsub("([0-9]+).*$", "\\1", Declared_age))
scatterplot3d(dateconverted[4500:5115], age[4500:5115], New_cases[4500:5115], color=c("red","blue","green")[Status_converted[4500:5115]], pch=19, angle=75)它提供了一些大致如下的内容:

显然,图上有大量的工作要做,但是我想把前面向上旋转(围绕x轴)。
发布于 2021-12-23 14:53:41
您可以尝试生成更动态图形的其他库,这里可以看到一个例子:
library(rgl)
library(ggplot2)
library(knitr)
library(rglwidge)
plot3d(
mtcars$wt,
mtcars$disp,
mtcars$mpg,
type = "s",
size = 1,
lit = TRUE,
main = "Car Weight Vs Engine Displacement Vs Mileage",
sub = "3-D Plot"
)https://stackoverflow.com/questions/70462677
复制相似问题