How can I create a smooth histogram with a log-log scale?
I can use Histogram[data, "Log", "LogCount"]
to get a log-log histogram, or I can use SmoothHistogram[data]
to get a smooth histogram, but is there a way to combine these two functionalities?
Answer
You can simply get the SmoothKernelDistribution
and build the plot as you'd like:
data = Table[Sin[x]^3 + 1, {x, 0, 6 Pi, 0.1}];
dist = SmoothKernelDistribution[data];
LogLogPlot[PDF[dist, x], {x, 0.01, 2}]
Comments
Post a Comment