-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
I'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");Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
