Plotting a distribution

Please quote your code.

It is unclear what you want to plot for a distribution. The pdf, the cdf, or something else? In any case, here is a PGFPlotsX example:

using PGFPlotsX, Distributions

d = Normal(100.3434334, 0.05)
lo, hi = quantile.(d, [0.01, 0.99])
x = range(lo, hi; length = 100)
@pgf Axis({ xlabel = "x", ylabel = "pdf" },
          Plot({thick, blue }, Table(x, pdf.(d, x))))
@pgf Axis({ xlabel = "x", ylabel = "cdf" },
          Plot({thick, blue }, Table(x, cdf.(d, x))))

4 Likes