简体   繁体   English

R中的3d表面图,z尺寸随时间变化

[英]3d surface plot in R, with z dimension changing over time

I have a dataset with a xyz structure. 我有一个带有xyz结构的数据集。

X = age of arrival in the city
Y = year of arrival
Z = number of current survivors from X/Y combination

I have no problem plotting this for any given time using RGL in R. However I would like to introduce a time dimension. 在R中使用RGL在任何给定时间内绘制此图形都没有问题。但是,我想介绍一个时间维度。 I could of course make 23 plots and paste them together, but I would like to be able to manipulate the viewing on the fly, and treat the whole time series as one plot. 我当然可以制作23个图并将它们粘贴在一起,但是我希望能够即时操纵视图并将整个时间序列视为一个图。 I have Z values for 23 years. 我有23年的Z值。 I also would like to colour my plot with an extra z2 variable, being z_year/z_(year-1). 我还想用一个额外的z2变量给我的绘图着色,即z_year / z_(year-1)。 Is this possible within the RGl pakcage with some programming or is there a better package available? 是否可以通过某些编程在RGl包装中使用它,或者有更好的包装可用?

Try creating a video like described on SO.. 尝试创建像SO ..所述的视频

Alternative is a for-loop with a plot and delaying it -> look at ?Sys.sleep 另一种方法是使用绘图进行for循环并延迟它->查看?Sys.sleep

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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