bwlewis / rthreejs

Three.js widgets for R and shiny
http://bwlewis.github.io/rthreejs
Other
303 stars 64 forks source link

To do: add more standard scatterplot3d options #2

Open bwlewis opened 9 years ago

bwlewis commented 9 years ago

The full scatterplot3d function options are:

     scatterplot3d(x, y=NULL, z=NULL, color=par("col"), pch=par("pch"),
         main=NULL, sub=NULL, xlim=NULL, ylim=NULL, zlim=NULL,
         xlab=NULL, ylab=NULL, zlab=NULL, scale.y=1, angle=40,
         axis=TRUE, tick.marks=TRUE, label.tick.marks=TRUE,
         x.ticklabs=NULL, y.ticklabs=NULL, z.ticklabs=NULL,
         y.margin.add=0, grid=TRUE, box=TRUE, lab=par("lab"),
         lab.z=mean(lab[1:2]), type="p", highlight.3d=FALSE,
         mar=c(5,3,4,3)+0.1, bg=par("bg"), col.axis=par("col.axis"),
         col.grid="grey", col.lab=par("col.lab"), 
         cex.symbols=par("cex"), cex.axis=0.8 * par("cex.axis"),
         cex.lab=par("cex.lab"), font.axis=par("font.axis"),
         font.lab=par("font.lab"), lty.axis=par("lty"),
         lty.grid=par("lty"), lty.hide=NULL, lty.hplot=par("lty"),
         log="", ...)

Let's add support for them to make scatterplot3js as drop-in as possible.

bwlewis commented 9 years ago

xlim/ylim/zlim have been added...planning on more in the next version.

jamesa8 commented 9 years ago

Sorry to ask this, but will this update include the ability to add multiple sets of data? Scatterplot3d allows for points to be added to the graph using points3d but I currently don't see this functionality.

bwlewis commented 9 years ago

Sure, I think it's possible to emulate the points3d function after a fashion. I'll try to add that.

jamesa8 commented 9 years ago

Thanks so much!

bwlewis commented 9 years ago

OK, I think this is working now in commit https://github.com/bwlewis/rthreejs/commit/84ff30cbb4a64a8c38beea650212d873991f0667

As usual, try it out by installing the latest code from GitHub:

devtools::install_github("bwlewis/rthreejs")

See the new example in ?scatterplot3js