You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m trying to plot list-like tree structures using TreePlot and get various errors. Here is a minimal example.
using GraphRecipes, AbstractTrees, Plots
abstract type L end
struct E <: L end
struct N <: L n :: L end
Base.isempty(::E) = true
AbstractTrees.children(l :: N) = [ l.n ]
AbstractTrees.printnode(io::IO, ::E) = print(io, "E")
AbstractTrees.printnode(io::IO, ::N) = print(io, "N")
plot(TreePlot(E()))
plot(TreePlot(N(E())))
plot(TreePlot(N(N(E()))))
The first plot crashes with
MethodError: reducing over an empty collection is not allowed; consider supplying init to the reducer
The second with
DimensionMismatch: new dimensions (4, 0) must be consistent with array size 2
The last one with
DivideError: integer division error
The text was updated successfully, but these errors were encountered:
I’m trying to plot list-like tree structures using
TreePlot
and get various errors. Here is a minimal example.The first plot crashes with
The second with
The last one with
The text was updated successfully, but these errors were encountered: