Platinum Partner
architects,bigdata,tips and tricks,r,data visualization,big data,3d plotting

An Interactive 3D Plot in R

Following along with my course in R, here's some code to make interactive 3D plots:

> library(rgl)
> library(evd);
> data(lossalae)
> U=rank(lossalae[,1]+rnorm(nrow(lossalae),
+ mean=0,sd=.001))/(nrow(lossalae)+1)
> V=rank(lossalae[,2])/(nrow(lossalae)+1)
> M=kde2d(qnorm(U),qnorm(V),n=35)
> library(rgl)
> persp3d(M$x,M$y,M$z,col='green',
+ xlab="loss",ylab="alae",zlab="")

 

 

Published at DZone with permission of {{ articles[0].authors[0].realName }}, DZone MVB. (source)

Opinions expressed by DZone contributors are their own.

{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}