get_rough_chart(), using your ggplot2 chart as the first argument. See this page for more ggrough examples and all the available options to customize your output.
ggrough is a work in progress and still has big bugs. Contributions are welcome!
ggrough works “ok” with RStudio Viewer. However you need to redraw your chart everytime you change the size of the Viewer tab and the charts will redraw when you try to copy it via
Export -> Save As Image. The latter can be annoying since some
roughjs settings can add a lot of randomness.
ggrough doesn’t work well with Rmarkdown files yet. For example, it can only generate one chart per document. If you have multiple charts it overlays them on top of each other.
ggrough is an htmlwidget. It converts your
ggplot2 chart to SVG using the package
svglite then parse the different elements (
<circle>…) to create a chart in a HTML Canvas element1 with
An article explaining how
ggrough works is in the making, to help potential contributors get started.
This package is only possible thanks to the massive work of:
roughjs can also render to SVG. This will be supported by
ggrough in the future↩