How can you use the same colour to the data in Epilog
as the data in the ListLinePlot
?
I am plotting 25 lists (4 in this question) on which I would need to mark each maximum.
I would like the point marking the maximum to have the same colour as the line (if possible with a black exterior circle).
Is it possible?
a = {1, 3, 6, 3, 2};
b = {3, 2, 5, 6, 9};
c = {2, 7, 3, 1, 6};
d = {4, 2, 8, 8, 10};
am = {Position[a, Max[a]][[1, 1]], Max[a]}
bm = {Position[b, Max[b]][[1, 1]], Max[b]}
cm = {Position[c, Max[c]][[1, 1]], Max[c]}
dm = {Position[d, Max[d]][[1, 1]], Max[d]}
ListLinePlot[{a, b, c, d}, AxesLabel -> {"Iteraciones", "Objetivo"},
LabelStyle -> {24, Bold},
PlotStyle -> {{Thickness[0.01]}, {Thickness[0.01]}, {Thickness[
0.01]}}, Epilog -> {PointSize[0.04], Point[{am, bm, cm, dm}]}]
ColorData[1, n]
for $n = 1, 2, \ldots$ $\endgroup$ – Rahul Apr 28 '14 at 9:41