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

2019-03-25 04:41发布

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 alt text

This image is taken from [1]. The transparency plays an important role as let us see the trajectory of the "measures" in the x-y plane.

Any help will be greatly appreciated.

[1]: Juban and Kariniotakis, "Uncertainty Estimation of Wind Power Forecasts", presentation at EWEC 2008 - 01 April - Brussels, Belgium. (I can't post the link, google will help interested readers).

标签: r 3d plot
3条回答
Root(大扎)
2楼-- · 2019-03-25 04:49

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.

查看更多
太酷不给撩
3楼-- · 2019-03-25 05:09

This is pretty, but is it really useful? Even with the transparency, it is very hard to track and compare different trajectories.

查看更多
放荡不羁爱自由
4楼-- · 2019-03-25 05:12

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... :(

查看更多
登录 后发表回答