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: