I am trying to achieve results like those below. I am able to get a normal distribution thatβs somewhat broken up with vertical bars:
π=1500
π=300
plot(Normal(π,π), title="Normal Distribution N($(π),$(π))", lw=3, label=["SAT Distribution"])
vline!([1200,1800], label="1 Standard Deviation")
vline!([900, 2100], label="2 Standard Deviations")
vline!([600, 2400], label="3 Standard Deviations")
But Iβd really prefer to be able to color the portion under a graph in different colors based on the x axis. Is this possible?
My closest attempt is the following, but it just cuts off the rest of the graph, rather than showing the whole curve:
π=1500
π=300
using Rmath
percentile = signifChop(pnorm(1800,π,π)*100,3)
plot(Normal(π,π), title="Normal Distribution N($(π),$(π)) to $(percentile) percentile", lw=3, label=["SAT Distribution"], fillrange=0)
xlims!((0,1800))
Hereβs a few examples of what Iβd like to be able to create: