::::::::::::::
Project.toml
::::::::::::::
[deps]
Catlab = “134e5e36-593f-5add-ad60-77f754baafbe”
GATlab = “f0ffcf3b-d13a-433e-917c-cc44ccf5ead2”
can supply Manifest.toml if of interest
running snippet below
from : The Category of Graphs · Catlab.jl
using GATlab, Catlab.Theories
using Catlab.CategoricalAlgebra
using Catlab.Graphs
using Catlab.Graphics
draw(g; kw…) = to_graphviz(g; graph_attrs, node_attrs, kw…)
draw(f::ACSetTransformation; kw…) =
to_graphviz(f; node_labels=true, edge_labels=true, draw_codom=false, kw…)
to_graphviz(SchGraph)
produces output
Catlab.Graphics.Graphviz.Graph(“G”, true, “neato”, Catlab.Graphics.Graphviz.Statement[Catlab.Graphics.Graphviz.Node(“n1”, OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => “V”)), Catlab.Graphics.Graphviz.Node(“n2”, OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => “E”)), Catlab.Graphics.Graphviz.Edge(Catlab.Graphics.Graphviz.NodeID[Catlab.Graphics.Graphviz.NodeID(“n2”, “”, “”), Catlab.Graphics.Graphviz.NodeID(“n1”, “”, “”)], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => “src”)), Catlab.Graphics.Graphviz.Edge(Catlab.Graphics.Graphviz.NodeID[Catlab.Graphics.Graphviz.NodeID(“n2”, “”, “”), Catlab.Graphics.Graphviz.NodeID(“n1”, “”, “”)], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:label => “tgt”))], OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(), OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}(:margin => “0”, :shape => “ellipse”), OrderedCollections.OrderedDict{Symbol, Union{String, Catlab.Graphics.Graphviz.Html}}())
which looks pretty well formed …
How does one get a persistent image, say graphics format file or pdf file from the above output?
Catlab info from Manifest.toml - deps do not appear to contain graphics/plotting support
[[deps.Catlab]]
deps = [“Compose”, “DataStructures”, “GeneralizedGenerated”, “JSON”, “LightXML”, “LinearAlgebra”, “Logging”, “MLStyle”, “Pkg”, “PrettyTables”, “Random”, “Reexport”, “Requires”, “SparseArrays”, “StaticArrays”, “Statistics”, “StructEquality”, “Tables”]
git-tree-sha1 = “40552f780d19dff2bfbcad8e810fac53b28c5264”
uuid = “134e5e36-593f-5add-ad60-77f754baafbe”
version = “0.14.2”
sensible paths seem to be
add package Graphviz_jll to use Julia implemented Graphviz
or install Graphviz externally and use it’s plotting capabilities
Cairo graphics seem associated with external Graphviz
( I am mostly interested in using the Julia - Catlab environnent to
support learning about and using applied category theory. )
Thanks in advance,
Roger Smith