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
normalization = : pdf
argument in hist
plot does not normalize correctly
#3780
Labels
Comments
asinghvi17
changed the title
Apr 12, 2024
normalization = : pdf
argument in hist
plot using Cairomakie
does not normalize correctlynormalization = : pdf
argument in hist
plot does not normalize correctly
This is a StatsBase issue and should probably be raised there. Consider the following: julia> h = StatsBase.fit(StatsBase.Histogram, testd .+ testd2)
Histogram{Int64, 1, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}}
edges:
7.0:0.5:11.0
weights: [6, 34, 158, 326, 315, 131, 27, 3]
closed: left
isdensity: false
julia> h_norm = StatsBase.normalize(h; mode = :pdf)
Histogram{Float64, 1, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}}
edges:
7.0:0.5:11.0
weights: [0.012, 0.068, 0.316, 0.652, 0.63, 0.262, 0.054, 0.006]
closed: left
isdensity: true
julia> h_norm = StatsBase.normalize(h; mode = :probability)
Histogram{Float64, 1, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}}}
edges:
7.0:0.5:11.0
weights: [0.006, 0.034, 0.158, 0.326, 0.315, 0.131, 0.027, 0.003]
closed: left
isdensity: false
So you will probably get what you're looking for using I'll close this issue for now, since it's not a problem we can solve in Makie directly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
are you running newest version (version from docs) ?
can you reproduce the bug with a fresh environment ? (
]activate --temp; add Makie
)What platform + GPU are you on?
issues for the following code:
The text was updated successfully, but these errors were encountered: