Histogram countsFracCurve should not be normalized by default
See original GitHub issueI’m no statistics guy but is this correct behaviour?
I would have expected the distribution curve to be scaled accordingly to the histogram, but it seems to only work if the histogram range of values is 100 exactly.
var plt = new ScottPlot.Plot(600, 400);
Random rand = new Random(0);
double[] values = DataGen.RandomNormal(rand, pointCount: 10000, mean: 50, stdDev: 5);
hist = new ScottPlot.Statistics.Histogram(values);
double barWidth = hist.binSize * 1.2; // slightly over-side to reduce anti-alias rendering artifacts
plt.PlotBar(hist.bins, hist.countsFrac, barWidth: barWidth, outlineWidth: 0);
plt.PlotScatter(hist.bins, hist.countsFracCurve, markerSize: 0, lineWidth: 2, color: Color.Black);
plt.Title("Normal Random Data");
plt.YLabel("Frequency (fraction)");
plt.XLabel("Value (units)");
plt.Axis(null, null, 0, null);
plt.Grid(lineStyle: LineStyle.Dot);
plt.SaveFig("Advanced_Statistics_Histogram.png");
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Should histograms be normalized first before fitting them?
Generally speaking, you shouldn't be using histograms to estimate parameters (unless you really have to; see bottom part of this answer for ...
Read more >Why does the normalized histogram give wrong y values ...
When the density keyword argument is set to True , the output histogram is normalized by the sum of each bin count so...
Read more >Problem in Histogram Normalization
Dear experts,. I"m tring to normalize some histograms both to its bin width and its number of events with the following function.
Read more >Histograms
It is often desirable to normalize the histogram in some way. To do this, the normalize attribute is used, and we want normalize=:pdf...
Read more >matplotlib.axes.Axes.hist2d — Matplotlib 3.1.0 documentation
All values outside of this range will be considered outliers and not tallied in the histogram. ... Normalize histogram. normed is a deprecated...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Awesome! Looking very much forward to the next major release (multiple Y axes 😄)
Just fixed this in 4.0.44 (on NuGet now) and it works as expected
Thanks again for noting this issue! Scott