可以說,我有以下 3D scatter plot
library(mvtnorm)
library(threejs)
u <- seq(-5, 5, by = .1)
v <- seq(-5, 5, by = .1)
M <- expand.grid(u,v)
x <- M$Var1
y <- M$Var2
sigma <- matrix(c(1, .5, .5, 1), nrow = 2, byrow = TRUE)
z <- dmvnorm(x = M, sigma = sigma)
scatterplot3js(x, y, z, phi = 40, theta = 20,
color=rainbow(length(z)),
colkey = FALSE,
cex = .3,
main = "Bivariate Normal")
雖然該地塊是好的,我想改變標簽x,y以及z一些自定義名稱,即A 1,B 1,C 1。
另外,我不是將z軸的刻度線顯示為行,%而是添加eg 而不是只報告0.18,我想報告0.18%
有什么辦法可以實作這些。
感謝您的任何指示。
uj5u.com熱心網友回復:
axisLabels而z.ticklabs在這些引數你在找什么?看?scatterplot3js
scatterplot3js(x, y, z, phi = 40, theta = 20,
color=rainbow(length(z)),
colkey = FALSE,
cex = .3,
main = "Bivariate Normal",
axisLabels=c("Axis label 1", "Axis label 2 [%]", "Axis label 3"),
z.ticklabs = c("0.00%","0.04%", "0.07%", "0.11%", "0.15%", "0.18%"))

轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/368702.html
下一篇:計算R中for回圈的均值
