Description Usage Arguments Value Examples
View source: R/plot-to-magiceye.R
Convert a 2ggplot2 object to a 3D autostereogram. Set dot colors used in final image.
1 2 3 4 5 6 | ggplot_to_magiceye(
ggobj,
colors = c("#00436b", "#ffed89"),
height = 6,
width = 6
)
|
ggobj |
A ggplot object. |
colors |
Array of at least 2 color hex codes. Colors should be visually distinct and avoid using too many. |
height |
Height of output matrix. Larger values take longer to render, but will have more detail. |
width |
Width of output matrix. Larger values take longer to render, but will have more detail. |
A raster matrix for plot()
.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.