Search code examples
rrgl

RGL help axes color


I am drawing a 3d mdsplot with the rgl package. I would like to know how can I change the color of the axes,labels and titles from black to white?

Thanks


Solution

  • Use r3dDefaults to set new defaults. But be aware that white is a bad colour for axes unless you ask for it not to be "lit"; you might want to turn off lighting just for the axes, rather than the whole plot as in this example:

    r3dDefaults$bg$color <- "gray"
    r3dDefaults$material$color <- "white"
    r3dDefaults$material$lit <- FALSE
    plot3d(rnorm(10), rnorm(10), rnorm(10))