JuliaGraphs / NetworkLayout.jl

Layout algorithms for graphs and trees in pure Julia.
Other
96 stars 22 forks source link

no method matching layout_args #57

Closed drdozer closed 1 year ago

drdozer commented 1 year ago

Hi - I tried to run the examples from your docs, but all of them gave me the same error. Here's a representative one:

ERROR: MethodError: no method matching layout_args(::Buchheim{Float64, Float64})
Closest candidates are:
  layout_args(::Any, ::Tuple{Integer, Integer}) at ~/.julia/packages/Plots/3BCH5/src/layouts.jl:448
  layout_args(::Any, ::Tuple{Colon, Integer}) at ~/.julia/packages/Plots/3BCH5/src/layouts.jl:450
  layout_args(::Any, ::Tuple{Integer, Colon}) at ~/.julia/packages/Plots/3BCH5/src/layouts.jl:456
  ...
Stacktrace:
 [1] layout_args(plotattributes::RecipesPipeline.DefaultsDict)
   @ Plots ~/.julia/packages/Plots/3BCH5/src/layouts.jl:425
 [2] build_layout(args::RecipesPipeline.DefaultsDict)
   @ Plots ~/.julia/packages/Plots/3BCH5/src/layouts.jl:490
 [3] _plot_setup(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any}, kw_list::Vector{Dict{Symbol, Any}})
   @ Plots ~/.julia/packages/Plots/3BCH5/src/pipeline.jl:208
 [4] plot_setup!(plt::Plots.Plot{Plots.GRBackend}, plotattributes::Dict{Symbol, Any}, kw_list::Vector{Dict{Symbol, Any}})
   @ Plots ~/.julia/packages/Plots/3BCH5/src/pipeline.jl:148
 [5] recipe_pipeline!(plt::Any, plotattributes::Any, args::Any)
   @ RecipesPipeline ~/.julia/packages/RecipesPipeline/BGM3l/src/RecipesPipeline.jl:89
 [6] _plot!(plt::Plots.Plot, plotattributes::Any, args::Any)
   @ Plots ~/.julia/packages/Plots/3BCH5/src/plot.jl:223
 [7] plot(args::Any; kw::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
   @ Plots ~/.julia/packages/Plots/3BCH5/src/plot.jl:102
 [8] #graphplot#80
   @ ~/.julia/packages/RecipesBase/BRe07/src/RecipesBase.jl:380 [inlined]
hexaeder commented 1 year ago

Can you share a MWE of what you're trying or link to the mentioned docs?

To me this is GraphRecipes.j related rather than NetworkLayout related, at least NetworkLayout does not appear in the stacktrace at all. The closest thing I could find in the GraphRecipes docs is layout_kw though.

Or maybe you're trying to run the examples from the NetworkLayout docs but with GraphRecipes.graphplot rather than GraphMakie.graphplot? Can you check that you're using the correct plotting package there?

drdozer commented 1 year ago

Fixed! It was due to a stale session in the vscode julia environment. Restarting vscode has fixed the issue. Thanks for your help, and sorry for the inconvenience.