I have a plot generated using ListPlot
. The plot consists of several points, which I connected using option Joined->True
. However, after joining I cannot see the joined points, because the have the same size as the connecting line. Is it possible to only increase the size of the points markers, but not the whole line?
2 Answers
You can use PlotMarkers
:
ListPlot[Table[Prime[n], {n, 10}], PlotMarkers -> {Automatic, 8}, Joined -> True]
Just to illustrate various approaches including using Epilog
trick:
d = SortBy[RandomReal[1, {10, 2}], First];
c = Column[{#, ListPlot[d, Joined -> True, PlotMarkers -> #]},
Frame -> All, ItemSize -> 20] & /@
{{Automatic, 8}, {Style["\[FilledDiamond]", Red], 20}, {"+", 20}};
e = Column[{HoldForm[Epilog -> {Black, PointSize[0.03], Point[d]
, Yellow, PointSize[0.02], Point[d]}],
ListPlot[d, Joined -> True,
Epilog -> {Black, PointSize[0.03], Point[d], Yellow,
PointSize[0.02], Point[d]}]}, Frame -> All, ItemSize -> 20];
Grid[Partition[Join[c, {e}], 2]]