How to plot a set of densities in 3D using R?

前端 未结 2 1255
忘掉有多难
忘掉有多难 2021-02-13 23:26

I need to plot, in 3D, a set of densities associated to a time series. More precisely, I would like to be able in R to build an image close to this example

相关标签:
2条回答
  • 2021-02-14 00:06

    In 1996 I wrote a paper (published in JCGS) with a figure very similar to that but without the transparency. See http://robjhyndman.com/papers/estimating-and-visualizing-conditional-densities/ for the details. The plotting function is implemented in the R package hdrcde available on CRAN. The package contains some examples in the help files. You should be able to adapt my code to add the transparency.

    0 讨论(0)
  • 2021-02-14 00:25

    This is how far I got thanks to Rob's hint. I used persp() to create an empty plot and added polygons and lines to it:

    alt text

    However, it is not as pretty as the original one... :(

    0 讨论(0)
提交回复
热议问题