Spirograph in R

How to export Spirograph to .pdf, .svg and .gcode?

Run the code in RStudio Console, Plots: Export, Save as PDF…, choose File name, Save.

Run InkSpace with a blank new document, drag and drop the PDF, OK, Object - Ungroup (Shift+Ctrl+G), delete 3 unnecessary objects (white background, axes labels, frame with axes values).

File, Document properties (Shift+Ctrl+D), Custom size - Units: px, Display units: px, Scale: 1, Orientation: Landscape.

Move the picture to the right place, zoom it (with proportion locked), select it, Path - Object to Path (Shift+Ctrl+C).

Save as .SVG.

Extensions - Export, TurnKeyLaser Exporter… Choose File name .GCODE, Apply. If the plugin freezes and the .GCODE file is created, it is safe to kill the Inkscape. Otherwise, switch to desktop (Win+D), click on the Inkscape in the taskbar and a window with the OK button should appear, press OK, Close.