Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:kharchenkolab/Baysor
Browse files Browse the repository at this point in the history
  • Loading branch information
VPetukhov committed Sep 13, 2024
2 parents 4257d73 + 4d3fc4e commit 332e657
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/reporting/plots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ end

function plot_num_of_cells_per_iterarion(
n_comps_dict::Vector{Dict{Int64, Int64}}; legend_position::Symbol=:lt,
inset_bbox::Tuple{Int, Int, Int, Int}=(370, 550, 180, 330)
figsize=(500, 350), inset_bbox::Tuple{Int, Int, Int, Int}=(300, 480, 150, 310),
legend_titlesize::Int=16, legend_labelsize::Int=14
)
(length(n_comps_dict) > 0) || error("No data about #components per iteration was stored")

Expand All @@ -144,7 +145,7 @@ function plot_num_of_cells_per_iterarion(
n_components_per_iter = n_components_per_iter[sortperm(labels),:]
labels = sort(labels)

fig = MK.Figure(size=(300, 200));
fig = MK.Figure(size=figsize);
axis_args = (
xticksvisible=false, yticksvisible=false, xticklabelsize=14, yticklabelsize=14,
xlabel="Iteration", ylabel="Num. cells", xlabelpadding=0, ylabelpadding=0
Expand All @@ -154,7 +155,7 @@ function plot_num_of_cells_per_iterarion(
for i in 1:size(n_components_per_iter, 1)
MK.lines!(n_components_per_iter[i,:], label="$(labels[i])", color=ColorSchemes.Dark2_8[mod(i - 1, 8) + 1])
end
MK.axislegend("Min #molecules"; position=legend_position, nbanks = 2, titlesize=16, labelsize=14)
MK.axislegend("Min #molecules"; position=legend_position, nbanks = 2, titlesize=legend_titlesize, labelsize=legend_labelsize)
MK.xlims!(MK.current_axis(), 0, size(n_components_per_iter, 2))
MK.ylims!(MK.current_axis(), 0, maximum(n_components_per_iter))

Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ end
polygons = BPR.boundary_polygons_auto(pos_data, df_spatial.cell; estimate_per_z=true)[2]
@test length(polygons) == (n_stacks + 1)
@test "2d" in keys(polygons)
@show all("$(Float64(v))" in keys(polygons) for v in unique(z_vals))
@test all("$(Float64(v))" in keys(polygons) for v in unique(z_vals))

n_stacks = 50
max_slices = 10
Expand Down

0 comments on commit 332e657

Please sign in to comment.