2
$\begingroup$

I have three lists as follows:

a={{2, 0.665722}, {3, 0.905889}, {4, 0.726617}, {5, 0.660435}, {6, 
  0.604611}, {7, 0.674972}, {8, 0.707353}, {10, 0.659372}, {15, 
  0.636084}, {20, 0.619646}, {25, 0.621381}, {30, 0.611772}};

b={{2, 0.802873}, {3, 0.711238}, {4, 0.629678}, {5, 0.629618}, {6, 
  0.523421}, {7, 0.555295}, {8, 0.547796}, {10, 0.514147}, {15, 
  0.502377}, {20, 0.491145}, {25, 0.483472}, {30, 0.482045}};
c={{2, 0.711703}, {3, 0.754504}, {4, 0.679128}, {5, 0.62195}, {6, 
  0.645394}, {7, 0.620675}, {8, 0.595152}, {10, 0.581504}, {15, 
  0.566386}, {20, 0.558949}, {25, 0.553173}, {30, 0.551369}};

If I plot them like this

ListLinePlot[{a, b, c}, 
 PlotLegends -> {"a", "b", "c"}, 
 Epilog -> {PointSize[0.02], 
   Point[{a, b, c}]}, 
 AxesLabel -> {"X", "Y"}]

I get the following plot.

enter image description here

However, I want the epilog for a, b, c all with the corresponding colors.

How can I do this?

$\endgroup$
0

2 Answers 2

5
$\begingroup$

If you are not locked in to using Epilog, you could use the builtin functionality of ListLinePlot.

ListLinePlot[{a, b, c}, PlotLegends -> {"a", "b", "c"}, 
 AxesLabel -> {"X", "Y"}, PlotMarkers -> {\[FilledCircle], 10}]

enter image description here

$\endgroup$
0
$\begingroup$

If you wanted to use Epilog do something like this.

ListLinePlot[{a, b, c}, PlotLegends -> {"a", "b", "c"},
 Epilog -> {PointSize[0.02],
   Riffle[{Blue, Orange, Green},Point /@ {a, b, c}]}, 
      AxesLabel -> {"X", "Y"}]

Matching the exact default colors used by ListLinePlot can be done ( search this site ).

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.