Plot SVG with AxiDraw
Plot SVG with AxiDraw
- status
Everything else in this pack prepares art. Plot SVG with AxiDraw is where the machine actually moves. Give it a plot-ready SVG string and it hands the file to axicli, the AxiDraw command-line tool, which drives the pen across the paper - speed, layer, pen delays and all. It's an output node: no outputs to wire onward, just a status string reporting what happened. This is the physical payoff at the end of the pipeline.
You need three things to use it: the SVG (ideally from Optimize SVG with vpype, because raw tracers plot terribly), the AxiDraw software with axicli on your PATH, and a real AxiDraw connected over USB. No plotter, no dice - this node does nothing virtual.
How it works
The node writes your svg_string to a temporary file and runs axicli with the settings you pick. The interesting inputs:
layer(1–8, default 2) - which SVG layer to plot. AxiDraw software plots SVG layers in order, and layer selection is how multi-layer/multi-color plots work: separate your drawing into layers, then run this node once per layer, swapping pens between runs.pen_up_speed(1–100, default 75) andpen_down_speed(1–100, default 25) - how fast the carriage moves with the pen raised versus lowered. Fast pen-up moves save time; slow pen-down keeps line quality. 75/25 is a sane starting point.pen_up_delay/pen_down_delay(ms, default 0) - pauses so ink can flow or dry before the next move. Useful for felt-tips that drag. Leave at 0 until you see a problem.wait_for- an optional string input that accepts a connection, letting you sequence the plot after other work completes (handy when you want a plot to start only after an upload or a video render finishes).
When the run finishes, the node calls axicli --mode align to disengage the plotter so the pen lifts and the motors release - you shouldn't have to babysit the end of a job. status reports "Plot completed successfully." or returns an error message as the string.
Install
It's in the ComfyUI PenPlotter pack. ComfyUI Manager → search "ComfyUI PenPlotter", or:
cd ComfyUI/custom_nodes
git clone https://github.com/wouterverweirder/comfyui-penplotter
Restart ComfyUI. Beyond the pack's usual requirements (numpy>=2.3.4, opencv-python, numba, vpype, websockets, requests, qrcode[pil], and the AxiDraw API installed from a URL zip), this node needs the full AxiDraw software so axicli exists on your PATH.
Common issues
- "axicli command not found" - the most common failure. The Python API alone isn't enough; install the AxiDraw software and make sure
axicliresolves from the same environment ComfyUI runs in. - Plot runs but nothing draws - pen not down or ink not flowing. Check
pen_down_speed, the pen holder, and that your SVG actually has stroke (fill-only SVGs won't plot). - Wrong layer plotted - you're seeing layer 1 when you expected layer 2, or vice versa. Set
layerto match the layer the drawing lives on. - Interrupting a plot is slow or the pen stays down - the pack hooks ComfyUI's interrupt to terminate the running subprocess and disengage, but it's best-effort. If the pen is down after a Cancel, run Disengage Plotter manually.
One honest warning: this node talks to physical hardware over USB, and subprocess-based plotting can be finicky about ports and drivers. It's not as polished as the official AxiDraw Inkscape extension - it's a ComfyUI-native convenience wrapper, and the killer feature is that your whole image-to-plot workflow stays in one graph.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| svg_string | STRING | — | |
| layeropt | INT | 21–8 | — |
| pen_up_speedopt | INT | 751–100 | — |
| pen_down_speedopt | INT | 251–100 | — |
| pen_up_delayopt | INT | 00–5000 | — |
| pen_down_delayopt | INT | 00–5000 | — |
| wait_foropt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |