Skip to content
Snippets Groups Projects
Commit 0f9dddf9 authored by Luca Lenz's avatar Luca Lenz
Browse files

update

parent 4f2c9963
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ end
## For multiple samples
function chainplot!(
axs::AbstractVector{<:AbstractVector{<:Makie.AbstractAxis}}, x::AbstractVector{<:AbstractVector{<:Real}};
state_label="State", dims=min(length(axs), length(x)), kwargs...)
state_label="State", dims=length(x), kwargs...)
return [
chainplot!(axs[i], x[i];
state_label= (state_label isa String ? "$state_label $i" : state_label[i]),
......@@ -40,7 +40,7 @@ function chainplot!(
for i=1:dims
]
end
function chainplot(x::AbstractVector{<:AbstractVector{<:Real}}; dims=min(length(axs),length(x)), size=(1024, 512 * dims), kwargs...)
function chainplot(x::AbstractVector{<:AbstractVector{<:Real}}; dims=length(x), size=(1024, 512 * dims), kwargs...)
fig = Figure(; size)
axs = [ [Axis(fig[i,1]), Axis(fig[i,2])] for i=1:dims ]
plt = chainplot!(axs, x; kwargs...)
......@@ -66,7 +66,7 @@ end
# multiple states
function chainplot!(
axs::AbstractVector{<:AbstractVector{<:Makie.AbstractAxis}}, x::AbstractVector{<:AbstractVector{<:Real}}, logp_x::AbstractVector{<:Real};
dims=min(length(axs), length(x)), kwargs...)
dims=length(x), kwargs...)
plt_logp = chainplot!(axs[1], logp_x; state_label="Target")
plt_x = chainplot!(axs[2:dims+1], x; dims, kwargs...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment