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.

In this simple code

ListPlot[Table[Sin[x], {x, 0, Pi, .1}], PlotRange -> {0, 0.5},
 Joined -> True, PlotMarkers -> Automatic, ClippingStyle -> None, Frame -> True]

enter image description here

We can see that there are two PlotMarkers appear at the clipped boundary. But actually there are not points, so they should not exist. How can we remove them? I have already used ClippingStyle -> None.


Update

As Alexey Popkov pointed out, this is really a bug. If we play with this code

data = {Table[{x, Sin[x]}, {x, 0, 1.05 Pi, .1}], Table[{x, Sin[2 x]}, {x, 0, 1.05 Pi, .1}]};
ListPlot[data, PlotRange -> {0, 0.5}, Joined -> True, PlotMarkers -> {Automatic, Medium}]

enter image description here

Now, even the same plot marker will be used for all data sets at the clipped boundaries, both top and bottom.

share|improve this question
1  
I think this behavior should be considered as a bug: the combination of Joined -> True with PlotMarkers -> Automatic and default values for ClippingStyle and PlotRangePadding produces spurious plot markers at the edges of plot. Here is better example: ListPlot[Table[{x, Sin[x]}, {x, 0, 1.05 Pi, .1}], PlotRange -> {0, 0.5}, Joined -> True, PlotMarkers -> Automatic]. –  Alexey Popkov Feb 5 at 2:37
    
@Alexey Popkov, I agree, already reported. –  saturasl Feb 5 at 4:24
    
This bug is still present in version 10.0.0. –  Mr.Wizard Jul 31 at 18:00

1 Answer 1

up vote 12 down vote accepted
ListPlot[Table[Sin[x], {x, 0, Pi, .1}], PlotRange -> {0, 0.5}, Joined ->
True, PlotMarkers -> Automatic, ClippingStyle -> False, Frame -> True]
share|improve this answer
    
+1 Is this documented anywhere? –  Simon Woods Feb 4 at 20:38
    
I just guessed this –  Coolwater Feb 4 at 20:41
1  
@Coolwater, good guess, thanks! None vs False, I remember there are similar cases, but can't exactly recall them for now. –  saturasl Feb 4 at 21:08
2  
PlotRangePadding -> None works too. It's documented, but not on the list of options in ListPlot-documentation, so you need to evaluate "ListPlot//Options" to find it –  Coolwater Feb 4 at 21:12
1  
FYI: ClippingStyle -> None does not work in v7, but False does. –  Mr.Wizard Feb 5 at 12:05

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.