Skip to content

Commit

Permalink
normalize histograms to PDF
Browse files Browse the repository at this point in the history
  • Loading branch information
odunbar committed Mar 23, 2023
1 parent 9bccc03 commit 6d99089
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ julia = "1.5"
[extras]
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

[targets]
test = ["StableRNGs", "Test"]
test = ["StableRNGs", "Test", "Plots"]
6 changes: 4 additions & 2 deletions src/PlotRecipes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export plot_marginal_hist
rows = Int(ceil(sqrt(n_plots)))
cols = Int(floor(sqrt(n_plots)))
tfs = 16
fs = 14
fs = 12

# subplot attr
legend := false
Expand All @@ -39,6 +39,7 @@ export plot_marginal_hist
dim_in_batch = i - minimum(batches[batch_id]) + 1 # i.e. if i=5 in batch 3:6, this would be "3"
@series begin
seriestype := :histogram
normalize --> :pdf
color := batch_id
subplot := i
title := pd.name[batch_id] * " (dim " * string(dim_in_batch) * ")"
Expand All @@ -56,7 +57,7 @@ end

size_l = Int(ceil(sqrt(n_plots)))
tfs = 16
fs = 14
fs = 12

# subplot attr
legend := false
Expand All @@ -73,6 +74,7 @@ end
for i in 1:n_plots
@series begin
seriestype := :histogram
normalize --> :pdf
subplot := i
title := "dim " * string(i)
samples[i, :]
Expand Down

0 comments on commit 6d99089

Please sign in to comment.