I am trying to create a PGFPlots surf
using the colormap viridis in a similar fashion as some examples of the PGFPlots package manual. I will get the error
Package pgfkeys Error: I do not know the key '/tikz/colormap/viridis' and I am going to ignore it. Perhaps you misspelled it. \end{axis}
when using the code
\documentclass{article}
\pagestyle{empty} % don't show the page number
\usepackage{graphicx}
\usepackage{algorithmic}
\usepackage{rotating}
\usepackage{tikz}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}
\usetikzlibrary{pgfplots.colormaps}
\usetikzlibrary[pgfplots.colormaps]
\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}[colormap/viridis , hide axis]
\addplot3[surf,z buffer=sort,samples=20,domain=-1:0,y domain=0:2*pi]
({-2*x * cos(deg(y))},
{-2*x* sin(deg(y))},
-x^2+100);
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}
I also tried colormap name=viridis
, but still no cigar. Any ideas
Thanks in advance.
\documentclass
command, has a minimal preamble and then\begin{document}...\end{document}
. In particular, here it would be helpful to know exactly what packages you are using. This makes it much easier for people to help you --- and much more likely that they will!