我正在尝试将我的 z 轴标签定义为 R 0 in plot3D
,下面是我的代码,我正在使用我的表达式zlab
,但我得到的结果与此处所附的图像一样。
library(plot3D)
lambda <- 1/12
sigma <- 0.4
gamma <- 0.4
beta <- 0.00007
c <-0.0034
m <- (0.08/12)
mu <- 1
f <- function(x,y){(beta*(x*(m+lambda)/((m+c)*(m+lambda)+m*y))*sigma*gamma)/((m+sigma+c)*(m+mu+c))}
x <- seq(0,1000,10)
y <- seq(0,1,0.01)
z <- outer(x,y,f)
persp3D(x=x, y=y, z=z,
col.palette = heat.colors,
phi = 20, theta = 300, nticks=4,
zlab=expression('R'[0]), ylab = "k", xlab="A",
xlim = c(0, 1000),
ylim = c(0, 1),
zlim = c(0, 3.5),
box = TRUE, border = NA, shade = .4,ticktype="detailed",scale= TRUE, expand = 0.5)