Message Boards Message Boards


How to only use filled and empty extent markers in the middle

Posted 2 months ago
0 Replies
0 Total Likes

I am plotting a piecewise distribution function for a discrete distribution:

distributionFunction[p_]:=\[Piecewise]  0    p<1
0.4 1<=p<2
0.7 2<=p<3
0.9 3<=p<4
1   4<=p

I would like to plot the function so when there is a jump up there is an empty extent marker below and a filled marker above and to the right. I can do that with this.

DiscretePlot[distributionFunction[p], {p, 0, 5}, ExtentSize -> All, 
 ExtentMarkers -> {"Filled", "Empty"}]

However, I am not able to tell the function to use not extent marker for -infinity which would be zero in this case. I also don't want the function to add empty extent markers for positive infinity.

Is there a way to control this behavior with Discrete Plot? I could specify something like empty extent markers at <1,0>, <2,0.4>, <3,0.7>, and <4,0.9> and filled extent markers at <1,0.4>, <2,0.7>, <3,0.9>, and <4,1>.

POSTED BY: Peter Burbery
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract