# How to change the colour of certain PlotMarkers

Example data

data =
<|15 -> 10.374822, 16 -> 10.34133, 17 -> 10.309573,
18 -> 10.291027, 19 -> 10.276617, 20 -> 10.295909,
21 -> 10.352042, 22 -> 10.352042|>;


I want to highlight the three largest values in the following manner:

sort = ReverseSort[DeleteDuplicates @ ReverseSort @ data][[;; 3]];


<|15 -> 10.3748, 22 -> 10.352, 16 -> 10.3413|>

call = Thread[Keys[sort] -> Callout @@@ Transpose[{Values[sort], {"a", "b", "c"}}]]


{15 -> Callout[10.3748, "a"], 22 -> Callout[10.352, "b"], 16 -> Callout[10.3413, "c"]}

plot = <|data, call|>;

ListLinePlot[
Values @ plot,
BaseStyle -> Thickness[0.002],
DataRange -> MinMax @ Keys[plot],
Frame -> True,
FrameTicks -> Keys[plot],
GridLines -> Automatic,
PlotMarkers -> {\[FilledSquare], 24}]


Two questions:

1. How can I change the colour of the PlotMarkers at positions a, b and c to Red ?

2. How can I change the size of PlotMarkers ? (the 24 in the above example doesn't change anything)

## 1 Answer

Question 1: Combining ListLinePlot for all datapoints and ListPlot for a,b,c positions only.

Show[
ListLinePlot[Values@plot, BaseStyle -> Thickness[0.002],
DataRange -> MinMax@Keys[plot], Frame -> True,
FrameTicks -> Keys[plot], GridLines -> Automatic,
PlotMarkers -> {"\[FilledSquare]", 16}],
ListPlot[Normal@sort /. Rule -> List, PlotMarkers ->
{Style["\[FilledSquare]", Red, 16]}]
]
(*Output*)


Question 2: Converting FilledSquare to String makes it resizable

Show[
ListLinePlot[Values@plot, BaseStyle -> Thickness[0.002],
DataRange -> MinMax@Keys[plot], Frame -> True,
FrameTicks -> Keys[plot], GridLines -> Automatic,
PlotMarkers -> {"\[FilledSquare]", 18}],
ListPlot[Normal@sort /. Rule -> List, PlotMarkers ->
{Style["\[FilledSquare]", Red, 22]}]
]
(*Output*)