An open API service indexing awesome lists of open source software.

https://github.com/tkf/showgraphviz.jl


https://github.com/tkf/showgraphviz.jl

Last synced: 11 months ago
JSON representation

Awesome Lists containing this project

README

          

# ShowGraphviz: Derive various `show` methods from `text/vnd.graphviz`

The main API of ShowGraphviz.jl is `@deriveall`. Given a type that defines
`show` on DOT language MIME type`text/vnd.graphviz`, it defines `show` methods
for various image types such as PNG, GIF, SVG, PDF, etc.

```julia
struct HelloWorld end

Base.show(io::IO, ::MIME"text/vnd.graphviz", ::HelloWorld) =
print(io, "digraph G {Hello->World}")

using ShowGraphviz
ShowGraphviz.@deriveall HelloWorld

svg = sprint(show, "image/svg+xml", HelloWorld())
occursin("