简体   繁体   中英

R 3D line chart

I am trying to create a chart as per image below in R. I have a basic straightforward matrix with locations and values over time, and would like to plot them as per below. I recognize that one could offset / shift each value manually vertically and horizontally for consecutive rows, but was hoping there is an existing package / graphical option to plot these graphs directly from the matrix. Help much appreciated, W

在此输入图像描述

mat <- sapply(-10:10, function(mean) dnorm(seq(-20,20,len=210), mean))+
        sapply(rep(0,21), function(mean) dnorm(seq(-20,20,len=210), mean))
matplot(seq(-20,20,len=210), mat, type="n", ylim=c(0,1.5))
matlines(seq(-20,20,len=210), mat+rep( seq(0,1, len=21), each=210), lty=1,col=1)

在此输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM