I'm trying to draw a graph from a table were I have these data:


So I would like to draw 6 lines in my graph:

  • 2 means
  • 2 for the maximum values
  • 2 for the minimum values

Moreover I'd like to "mark" the means with a stronger color, like blue and red, and give the other two a different color wich is less strong, for example cyan or orange.

So I included


Letting tikz take care of loading xcolor I passed it the following options:


If I try to load xcolor by itself I get an error while this way works fine.

Then I take the values from the file this way:

    \begin{axis}[width=\linewidth, xmin=0, xmax=8192, ymin=0]
        \addplot [thick, blue] table [mark=none, y=AVRG1, x=DIM]{time1-CPU.data};
        \addplot [small, cyan]table [mark=none, y=MAX1, x=DIM]{time1-CPU.data};

This does work because cyan is in tikz [2]. But let's suppose that instead of cyan I'd like to use Cerulean which is xcolor [1], then I get the following error:

 Package pgfkeys Error: I do not know the key '/tikz/Cerulean' and I am going to ignore it. Perhaps you misspelled it

How can I make it work? Thank you!

EDIT: Here is an example





    colorlinks=true, linktocpage=true, pdfstartpage=1, pdfstartview=FitV,
    breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,
    plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,
    hypertexnames=true, pdfhighlight=/O,
    urlcolor=black, linkcolor=black, citecolor=black,


\setminted{tabsize=4, breaklines, breakanywhere, linenos, mathescape, fontsize=\small}

\definecolor{Ashgrey}{rgb}{0.7, 0.75, 0.71}
\definecolor{Atompurple}{rgb}{0.6, 0.4, 0.8}

      morekeywords={compute, from, throw, std, ostringstream, __LINE__, __FILE__, define},





            \begin{axis}[width=\linewidth, xmin=0, xmax=8192, ymin=0, xlabel=\# Clotoidi, ylabel=Tempo medio ($ms$)]
                \addplot [thick, draw=blue] table [mark=none, y=AVRG, x=DIM]{time1-CPU.data};
                \addplot [small, cyan]table [mark=none, y=MAX, x=DIM]{time1-CPU.data};
                \addplot [small, color=Cerulean]table [mark=none, y=MIN, x=DIM]{time1-CPU.data};


        {\normalfont\Huge\bfseries}{Allegato \thechapter}{1em}{}


I've left all the packages inside because I don't know if any of them can clash with another (?).

Compiling this gives:

Package xcolor Error: Undefined color `Cerulean'.


Package xcolor Error: Undefined color `tikz@color'.

[1] https://en.wikibooks.org/wiki/LaTeX/Colors

[2] https://en.wikibooks.org/wiki/LaTeX/PGF/TikZ#Color

  • 4
    Welcome to TeX.SE! Could you please provide us with a complete minimal example, i.e. a small document that starts with \documentclass, ends with \end{document} and illustrates the problem? (And did you try color=Cerulean? You seem to be saying you use \usetikzlibrary{graphdrawing} but the example you use uses pgfplots syntax.)
    – user121799
    Sep 20, 2018 at 7:04
  • Yeah sure, the document is quite big, so I'll try to make a smaller one. I didn't try color=Cerulean I shall try right away, thank you
    – icosac
    Sep 20, 2018 at 7:46

2 Answers 2


Here is an example that shows Cerulean works just fine:

enter image description here



        \addplot [thick, red,      mark=none] {x+3};
        \addplot [thick, Cerulean, mark=none] {-2*x-4};
  • Ok, solved that, I just had to move \PassOptionsToPackage{usenames,dvipsnames}{xcolor} up... I feel a little bit stupid ahahah... Thanks!
    – icosac
    Sep 20, 2018 at 8:01
  • @icosac: Don't feel stupid, You aren't the first, not the last to make such a mistake. I am sure I have made it many times. Perhaps if you change the title to something along the lines as to where one should place \PassOptionsToPackage that might make it easy for other to locate this question when they have that problem. Sep 20, 2018 at 17:13
  • Yes, sure thing, changing it right now
    – icosac
    Sep 21, 2018 at 7:18

You can define your own colours at the start


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .