Back

render-to-bytes (clj)

(source)

function

(render-to-bytes g & {:keys [alg fmt], :or {alg "dot", fmt :png}, :as opts})
Renders the graph g in the image format using GraphViz and returns data as a byte array. Requires GraphViz's 'dot' (or a specified algorithm) to be installed in the shell's path. Possible algorithms include :dot, :neato, :fdp, :sfdp, :twopi, and :circo. Possible formats include :png, :ps, :pdf, and :svg.

Examples