When using ListPlot, if I set Joined->True and also set PlotMarkers -> {Automatic}, then if the range of values I feed into PlotRange are smaller than the range of data I've fed into ListPlot (i.e. if not all data is shown in the plot), then I get color/style mismatched markers, as I will show with an example.

data1 = Table[{x, Sin[x]}, {x, 0, 2 Pi, Pi/6}];
data2 = Table[{x, Cos[x]}, {x, 0, 2 Pi, Pi/6}];

ListPlot[{data1, data2}, Joined -> True, PlotRange -> {{Pi/6, 11 Pi/6
}, {-5/6, 5/6}}, PlotMarkers -> {Automatic}]

This code produces the following plot:

plot produced by above code

Note how the color of the 'endcap' markers (I don't know what else to call them) for the dataset data2 (yellow) is still blue and the shape is incorrect.

I would like to know how to manipulate these 'endcap' markers. Frist, how do I change these specific 'endcap' markers to match the color and style of the rest of the markers associated with that data set? Sdcond, how can I remove these 'endcap' markers.



Browse other questions tagged or ask your own question.