I am using
plot3d(x,y,z, col=test$color, size=4)
to plot a 3d scatterplot of my dataset with R, but with rgl the size argument only takes one size.
Is it possible to have different sizes for each data point, perhaps with another library, or is there a simple workaround?
Thanks for your ideas!
Here’s a work-around along the same lines suggested by Etienne. The key idea is to set up the plot, then use a separate call to
points3d()to plot the points in each size class.(FWIW, it does appear that there’s no way to get
plot3d()to do this directly. The problem is thatplot3d()uses the helper functionmaterial3d()to set point sizes and as shown below,material3d()only wants to take a single numeric value.)