Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Following code plots Quantiles for a GBM process.

ranges = {.01, .05, .25, .5, .75, .95, .99};
Manipulate[
 Plot[
  Quantile[
    GeometricBrownianMotionProcess[\[Mu], \[Sigma], 100000][t],ranges],
 {t, 1, 30},PlotRange -> {0, 1500000}], 
{\[Mu], .07, .1}, {\[Sigma], .07, .20}]

I would like to shade the area between between the ranges

.01 to .05 and .95 to .99 say lt. blue .05 to .25 and .75 to .95 say med. blue .25 to .75 say dark blue with the .5 quantile line thick black

Plot options seems to allow filling between curves using

Filling->{{1}->2} 

syntax but not sure how or if that can be applied here?

share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

Note that your list spec in the Filling suggestion is the other way around. You mean

Filling->{1->{2}} 

With this style you can incorporate the filling style directly there and therefore, what you want can be written down as

ranges = {.01, .05, .25, .5, .75, .95, .99};
col =col = RGBColor[.6, .6, 1];
Manipulate[
 Plot[Evaluate@
   Quantile[
    GeometricBrownianMotionProcess[μ, σ, 100000][t], 
    ranges], {t, 1, 30}, PlotRange -> {0, 1500000}, 
  PlotStyle -> Black, 
  Filling -> {1 -> {{2}, col}, 2 -> {{3}, Darker[col]}, 
              3 -> {{5}, Darker@Darker[col]}, 5 -> {{6}, Darker[col]},
              6 -> {{7}, col}}], 
{μ, .07, .1}, {σ, .07, .20}]

Mathematica graphics

For more functions to plot, you should maybe create this specification automatically.

share|improve this answer
    
Thank you! Yes, had list spec reversed which didn't help ;-) –  RobK Jan 2 at 1:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.