# Why does the filling on my ListPlot not reach the axis for some values? [duplicate]

Why does

pPost[1, k_, p_: 2/3, p1_: 1/3, p2_: 2/3] :=
(p p1^k (1 - p1)^(3 - k))/(p p1^k (1 - p1)^(3 - k) + (1 - p) p2^k (1 - p2)^(3 - k));
pPost[2, k_, p_: 2/3, p1_: 1/3, p2_: 2/3] :=
((1 - p) p2^k (1 - p2)^(3 - k))/(p p1^k (1 - p1)^(3 - k) + (1 - p) p2^k (1 - p2)^(3 - k));

Manipulate[
Show[
Plot[pPost[1, k, p, p1, p2], {k, 0, 3},
PlotStyle -> {Dashed, Thin},
PlotRange -> {All, {0, 1}},
Ticks -> {{0, 1, 2, 3}, Automatic}],
ListPlot[
{{#, pPost[1, #, p, p1, p2]} & /@ Range[0, 3],
{#, pPost[2, #, p, p1, p2]} & /@ Range[0, 3]},
PlotStyle -> {Green, Red},
Filling -> Axis]],
{{p, 2/3}, 0, 1},
Delimiter,
{{p1, 1/3}, 0, 1},
{{p2, 2/3}, 0, 1}]

produce plots where the filling "disconnects" from the axis for some values of the Manipulate parameters?

Try p=0.75, p1=0.7, p2=0.6:

or (weirder) p=p1=p2=0.5

• Didn't test but I suspect the Show. Set the final plot range in the ListPlot too, not just in Show, and set it to the same in all. Sorry if this doesn't help. Apr 5 '14 at 20:22
• @Szabolcs: Setting PlotRange -> {All, {0, 1}} in ListPlot seems to do the trick. Where is the need for that documented? Apr 5 '14 at 20:40
• I'm glad this helped. Sorry, I don't know where this is documented. What happens is that the lines are drawn only until the edge of the PlotRange. When you combine two graphics with Show, the PlotRange will be inherited from the first, so the filling lines for the second might not reach the frame edge. Apr 6 '14 at 0:55
• Apr 6 '14 at 16:29
• @Szabolcs: Thanks, that looks like an answer. (Still no sign of where this is documented; I bet it isn't, or at least not well.) Apr 6 '14 at 22:28