Create 3D plots in R with arbitrary data points and viewpoints

I need an R function that allows me to do the following two things at the same time:

  • Separate arbitrary piecewise functions like scatterplot3d. That is, this should allow me to specify an arbitrary set of three-dimensional coordinates in which points will be plotted.
  • Let me set the point of view of the graph at arbitrary angles along both axes, for example, persp.

plot3d is unacceptable since it only allows manual tuning of graphs after they are created. I want to be able to script this.

+6
source share
1 answer

In the file that I am currently developing, adding , there is a plot4d function that gives a neat example if, how to do it with rgl . You do not need to use a package for this: just copy the source of the function.

(note: you can get 2 warnings when downloading a package - this is due to a minor glitch in the beautiful glmnet package and nothing will break.)

+1
source

Source: https://habr.com/ru/post/899085/


All Articles