I'm having trouble with the way SmoothHistogram handles bins. At the end of the day, I want to express the vertical axis ticks in terms of the normalized values of the bin counts. This can easily be done with Histogram using "Probability" as the binning function, but this is not an option usable for SmoothHistogram. I have tried the following as a workaround:
rdata = RandomReal[{0, 1}, 1000];
bw = 0.01;
bins = BinCounts[rdata, bw];
maxBinCount = Max[bins];
SmoothHistogram[rdata, bw, "Intensity",
PlotRange -> {{0, 1}, Automatic}, Frame -> True,
FrameTicks -> {{Automatic, {{0, "0"}, {maxBinCount, "1"}}}, {Automatic, None}},
LabelStyle -> {Bold, 18}]
ListPlot[bins, Joined -> True]
Clearly, the second plot shows that the actual bin counts are not the things recorded by the "Intensity" binning function. How would I make the RHS ticks scale appropriately from 0 to 1 on the vertical plot space?
Using "PDF" (with maxBinCount replaced by 1 in the ticks) instead of "Intensity" gets closer, but since "PDF" isn't the actual overall probability as "Probability" would have been, this isn't quite right:
PDF
get you "closer" ? Why isn't it close enough? I'm just not understanding what is the desired output. $\endgroup$