First 3D representation with R

Well this is one of the first 3D images I was able to get from R.  It was created with random data and bin number was set to 10 on x,y and z coordinates. Resolution was too coarse to  obtain a decent “mixing” time.

First 3D representation of particle count in the studied vessel. Color indicates particle number, legend was still not created.



This image was created with scatterplot3D library, with symbols set to cube, Color scale denotes particle count in that “cube”. Legend was still not created. I’ll post the script later.

4 thoughts on “First 3D representation with R”

    1. Hallo, I guess you are the first comment that is not spam. I will look for it. I have not touched R in a few months. I upload it here if I find it.

    2. Hello, well I just had some time and got back to the old files, it is not done with scatterplot3d it is done with the RGL library. The next few lines are an example.

      #load library rgl
      #Give values to X,Y,Z to plot
      #Set some fancy color scale (it is not the simplest one just pasted from other code I had)
      lc = cbind(seq(1,100,by=2))
      lc = cut(lc, breaks=50)
      #Actually do the plotting
      shapelist3d(cube3d(), x, y, z, col=colslc,alpha=seq(0.1,1,length=100), size=0.42, override=TRUE)
      #Save the output file to png file format with specific name
      filename3 < - paste("rglexample",".png",sep="") rgl.snapshot(filename3)

      Hope it helps!

Leave a Reply

Your email address will not be published. Required fields are marked *