I have a list plot:
Print[ListPlot[Table[RAveList[ntempc], {ntempc, 2, 12}], Joined -> True,
PlotRange -> All, PlotStyle -> Table[colors[[ntempc]], {ntempc, 2, 12}],
PlotLegends ->
Placed[PointLegend[Table[colors[[ntempc]], {ntempc, 2, 12}],
Table[ntempc, {ntempc, 2, 12}], LegendMarkers -> Automatic], {Right, Top}],
Axes -> None, Frame -> True]];
My code is as above. I have 11 data list to plot with labelling "2-clusters" to "12-clusters", where number 2 or 12 is a variable, and "-clusters" is fixed text.
I explain a little more. colors
is a list of color names(i.e. Red, Blue... ). RAveList[ntempc]
is data sample to plot with labelling $n$-clusters.
Print
here apart from very specific applications. $\endgroup$List
,Table
is not necessary to extract a portion of theList
, e.g.,Table[colors[[ntempc]], {ntempc, 2, 12}] === colors[[2 ;; 12]] === Rest[colors]
$\endgroup$ListPlot
expression withPrint
. $\endgroup$