Skip to content

Commit

Permalink
add plot_eigenvals in Makie backend
Browse files Browse the repository at this point in the history
  • Loading branch information
rveltz committed Nov 28, 2024
1 parent 1521eab commit 3cb63ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/MakieExt/MakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module MakieExt
set_plot_backend!,
BK_Makie,
plotAllDCBranch,
plot_DCont_branch
plot_DCont_branch,
AbstractResult
include("plot.jl")

function __init__()
Expand Down
10 changes: 10 additions & 0 deletions ext/MakieExt/plot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,16 @@ function _plot_bifdiag_makie!(ax, bd::Vector{BifDiagNode}; code = (), level = (-
end
end
####################################################################################################
function plot_eigenvals(br::AbstractResult, with_param = true; var = :param, k...)
p = getproperty(br.branch, var)
data = mapreduce(x -> x.eigenvals, hcat, br.eig)
if with_param
series(p, real.(data); k...)
else
series(real.(data); k...)
end
end
####################################################################################################
plotAllDCBranch(branches) = plot(branches...)

function plot_DCont_branch(::BK_Makie, branches, nbrs::Int, nactive::Int, nstep::Int)
Expand Down

0 comments on commit 3cb63ee

Please sign in to comment.