Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve histogram docs #3101

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,9 @@ const _examples = PlotExample[
),
PlotExample( # 38
"Histogram2D (complex values)",
"",
"""
Other possible `normed` mode include `:probability`, where bin area (volumn) is not divided.
Copy link
Member

Choose a reason for hiding this comment

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

It is a bit unclear to me, what you are trying to say here

Copy link
Member Author

Choose a reason for hiding this comment

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

the _make_hist takes a normed argument, the example only shows normed=true, but under the hood, it calls the normalize! from StatsBase, with normalization mode default to :pdf, but there's actually another normalization mode, which is called :probability

Copy link
Member

Choose a reason for hiding this comment

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

I think these modes are quite good covered in https://docs.juliaplots.org/latest/generated/attributes_series/.
This example aims to show how complex data can be visualized as a 2D Histogram.
I agree it would be good to also have a graphic that compares the different modes (like in spirit with JuliaPlots/PlotDocs.jl#217), but here is not the right place.
Adding a different example would also be fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, I see, makes sense

""",
[
:(
begin
Expand Down