Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to add a slider for the x-axis that shows the value of the y-axis based on the position of the slider.

Basically providing the result of the probably given a specific lot percent defective, lpd value.

I can calculate the value and when I use Column the calculation doesn't respond to changes in the plot's manipulated changes. If I put the calculation within the manipulate plot line - it shows and formatting is pretty hard to read.

 Plot[N[Probability[x<=c, x \[Distributed] PoissonDistribution[SampleSize *lpd]]], {lpd,0,.1},
  PlotRange -> {0, 1}, Filling -> Axis],
 {SampleSize, 50, 1000, Appearance -> "Labeled"},
 {c, 0, 10, 1, Appearance -> "Labeled"}]
share|improve this question
f[c_, lpd_, SampleSize_] := Probability[x <= c, Distributed[x , 
   Plot[f[c, lpd, SampleSize], {lpd, 0, .1}, PlotRange -> {0, 1}, 
        Filling -> Axis, Epilog -> Inset[Framed[Style[{point, f[c, point, SampleSize]}, 20], 
                                        Background -> LightYellow], Automatic, Automatic]], 
   Graphics[{PointSize[Large], Red, Point[{point, f[c, point, SampleSize]}]}]],

 {SampleSize, 50, 1000, Appearance -> "Labeled"}, 
 {c, 0, 10, 1, Appearance -> "Labeled"},
 {point, N@10^-8, .1, Appearance -> "Labeled"}]

enter image description here

share|improve this answer
Great - Show, and Epilog are new to me. What is the N@10^-8 term for? to avoid zero? thanks, Fred – Fred Schenkelberg Apr 27 '13 at 16:57
@FredSchenkelberg Yep, just to avoid the zero – Dr. belisarius Apr 27 '13 at 17:04

Your Answer


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.