Does anyone know how I can to draw a line connecting a list of data, while the dots are a colour and the line another colour?
As an example, the following is a list of data and how I plot them
list = {{1, 5}, {2, 8.5}, {3, 12}, {4, 17}, {5, 21.5}};
ListPlot[list, PlotStyle -> {Thick, Red}, PlotRange -> All]
What I want is not the following
ListLinePlot[list, PlotStyle -> {Thick, Red}, PlotRange -> All]
But rather, a way to have the points of the list in red colour and the line connecting them in black. (the colours are random of course).
Also, can someone tell me how to plot these points with a different style? For example instead of the dots, maybe a cross or a star or something.
Thanks in advance.
ListLinePlot[list, Mesh -> Full, MeshStyle -> Directive[AbsolutePointSize[6], Red], PlotStyle -> Directive[Thick, Black]]
. If you want different markers,ListPlot[{{1, 5}, {2, 8.5}, {3, 12}, {4, 17}, {5, 21.5}}, Joined -> True, PlotMarkers -> Style["+", 16, Red], PlotStyle -> Directive[Thick, Black]]
$\endgroup$ListLinePlot[list, PlotStyle -> {Thick, Red}, PlotRange -> All, Epilog -> {Blue, AbsolutePointSize[8], Point[list]}]
$\endgroup$