Skip to content

Commit

Permalink
Use Stress as default layout for GraphMakie.graphplot
Browse files Browse the repository at this point in the history
  • Loading branch information
mofeing committed Sep 23, 2024
1 parent 4c73e8a commit b422fa2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/TenetGraphMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using Makie
const Graphs = GraphMakie.Graphs
using Tenet
using Combinatorics: combinations
const NetworkLayout = GraphMakie.NetworkLayout

"""
graphplot(tn::TensorNetwork; kwargs...)
Expand Down Expand Up @@ -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...)
Expand Down

0 comments on commit b422fa2

Please sign in to comment.