Skip to content

Commit

Permalink
workaround for Plots.jl not setting the correct ylims on one of the h…
Browse files Browse the repository at this point in the history
…eatmap marginals
  • Loading branch information
joshday committed May 21, 2024
1 parent 45f2341 commit ba04afa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/viz/heatmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,15 @@ end
link --> :x
z = Float64.(o.counts)
z[z .== 0] .= NaN
xlims = extrema(o.xedges)
ylims = extrema(o.yedges)
@series begin
s = marginals ? 3 : 1
subplot --> s
seriestype --> :heatmap
legend --> false
xlims --> xlims
ylims --> ylims
o.xedges, o.yedges, z'
end
if marginals
Expand All @@ -95,6 +99,7 @@ end
linewidth --> 0
line_alpha --> 0
seriestype --> :bar
xlims --> xlims
o.xedges, vec(sum(o.counts, dims=2))
end
@series begin
Expand All @@ -104,6 +109,7 @@ end
line_alpha --> 0
orientation --> :h
seriestype --> :bar
ylims --> ylims
o.yedges, vec(sum(o.counts, dims=1))
end
end
Expand Down

2 comments on commit ba04afa

@joshday
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/107323

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.7.0 -m "<description of version>" ba04afa24df766b949ab46f9fd806a168acc4d32
git push origin v1.7.0

Please sign in to comment.