在指定的时间间隔内向R中的现有绘图添加0值
我在R有一个现有的地块在指定的时间间隔内向R中的现有绘图添加0值,r,plot,R,Plot,我在R有一个现有的地块 z <- seq(20, 50, by=1) plot (z, (3 / (z+1))^5, type="b", xlab=expression(theta), ylab=expression(paste("P(",theta,")"))) z您只需生成已有的点,然后将它们与一组零连接起来 z <- seq(20, 50, by=1) y <- (3 / (z+1))^5 z <- c(1:20,20:50) y <- c(rep(0,
z <- seq(20, 50, by=1)
plot (z, (3 / (z+1))^5, type="b", xlab=expression(theta), ylab=expression(paste("P(",theta,")")))
z您只需生成已有的点,然后将它们与一组零连接起来
z <- seq(20, 50, by=1)
y <- (3 / (z+1))^5
z <- c(1:20,20:50)
y <- c(rep(0, 20), y)
plot (z, y, xlab=expression(theta), type="b",
ylab=expression(paste("P(",theta,")")))
z