My graph should represent the AST of Julia expressions like y = x + 10/a for instance; there is a catch though, these ys and xs are not just mere numbers; they are custom types (wrappers) that hold, among other things, numeric values.
I want my graph to also represent the label of the object x, which also holds a value, say 8.0
julia> using SimpleExpressions, AbstractTrees
julia> @symbolic x y;
julia> expression = 2*x + 3*x*y
(2 * x) + (y * (3 * x))
julia> print_tree(expression)
+
├─ *
│ ├─ 2
│ └─ x
└─ *
├─ y
└─ *
├─ 3
└─ x
On Slack I recommended other solutions, but now it seems that you just want a visualization of the tree?
BTW, if you take a look at the AbstractTrees.jl documentation, it points to D3Trees.jl, which can visualize the expression tree in a more graphic and interactive manner.
I don’t care too much about the style of the graph as long as I have control over the nodes’ display (meaning, I can customize the information to be displayed on each node)… like an “AST weighted computational graph”
For really fine control over labels attached to each node and edge, a tool you may consider is GraphViz, which can allow for fairly complex types of information to be included in each node (tables, for example Node Shapes | Graphviz).There is a graphviz_jll package that you could use to link to it.
I spent a lot of time looking into different libraries; I decided to use Graphviz but through Python using PyCall, because the Julia version is not maintained anymore (for at least a couple of years).