I'm trying to use cycle list name = MyCyclelist
in order to give my graphs all the same color/style scheme. However all lines are shown in black. I hope, somebody can help. Many thanks!
I've defined the cycle list in my header like this:
\pgfplotscreateplotcyclelist{MyCyclelist}{%
{darkgray, mark = none, thick},
{Green, mark = none, thick},
{MidnightBlue, mark = none, thick},
{Mahogany, mark = none, thick},
{RedOrange, mark = none, thick},
{RoyalPurple, mark = none, thick},
}
My pgfplot file is pretty standard:
\tikzsetnextfilename{nextfilename1}
\begin{tikzpicture}
\begin{axis}[
axis on top,
xlabel = abc,
ylabel = def,
xmin=0,
xmax=194,
ymin = 0,
legend style = {nodes=left, font =\footnotesize},
legend pos = north east,
height=0.5\textwidth,
width=\textwidth,
cycle list name=MyCyclelist
]
\pgfplotstableread{pictures/data.txt} \datatable
\addplot[legend image post style={sharp plot, line width=1pt, mark=none}, thick] table[x index = 0 , y index = 1 ] from \datatable;
\addlegendentry{abc}
\addplot[legend image post style={sharp plot, line width=1pt, mark=none}, thick] table[x index = 0 , y index = 3 ] from \datatable;
\addlegendentry{def}
\end{axis}
\end{tikzpicture}
data.txt looks like this:
0 6.21E-11 5.40E-11 8.73E-11
1 6.04E-11 4.86E-11 8.49E-11
2 5.16E-11 5.54E-11 7.30E-11
3 6.46E-11 4.63E-11 8.12E-11
\addplot
command the cycle list is not used for the plot. To change this behavior insert a+
between\addplot
and the optional argument:\addplot+[...]...;
.