What I have: A plot in which I want to assign a specific color of colorbrewer scheme "Set1" to a plot curve (instead of using them in their 'line of order'). This means the curve of "Simulation 1" should be red and the curve for "Simulation 2" should be purple. The color in question can be adressed as Set1-4-4 (or Set1-8-4, ect.) in the Brewer colors. However, I seem to have an error in the syntax, as shown in a MWE below.
It does give the desired outcome, if I work around with \definecolor
and the brewers RGB colors shown here, but I suppose there should be a better way?
What I read: Default color pgfplot, Pre-defined color cycles à la RColorBrewer?
The code
\documentclass[]{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{colorbrewer}
\pgfplotsset{cycle list/Set1}
\definecolor{c4}{RGB}{152,78,163}
\pgfplotsset{compat=1.13}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
cycle list name=Set1,
]
\addplot+[thick] {1/x};
\addplot+[very thick, loosely dotted] {1/x};
%\addplot+[very thick, loosely dotted, c4] {1/x}; %working
%\addplot+[very thick, loosely dotted, purple] {1/x}; %not working
%\addplot+[very thick, loosely dotted, color=Set1-4-4] {1/x}; %not working
\legend{
{Simulation 1},
{Simulation 2},
};
\end{axis}
\end{tikzpicture}
\end{document}