From b422fa2ae61c3d447e6131b2afa2fc388ffda7a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?= Date: Sun, 22 Sep 2024 23:44:48 -0400 Subject: [PATCH] Use `Stress` as default layout for `GraphMakie.graphplot` --- ext/TenetGraphMakieExt.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/TenetGraphMakieExt.jl b/ext/TenetGraphMakieExt.jl index e8e121d7e..bd5e974a1 100644 --- a/ext/TenetGraphMakieExt.jl +++ b/ext/TenetGraphMakieExt.jl @@ -5,6 +5,7 @@ using Makie const Graphs = GraphMakie.Graphs using Tenet using Combinatorics: combinations +const NetworkLayout = GraphMakie.NetworkLayout """ graphplot(tn::TensorNetwork; kwargs...) @@ -129,6 +130,7 @@ function GraphMakie.graphplot!(ax::Union{Axis,Axis3}, tn::TensorNetwork; labels= end get!(() -> repeat([:black], Graphs.ne(graph)), kwargs, :elabels_color) get!(() -> repeat([17], Graphs.ne(graph)), kwargs, :elabels_textsize) + get!(() -> NetworkLayout.Stress(), kwargs, :layout) # plot graph return graphplot!(ax, graph; kwargs...)