[Pgfplots-features] Problem with Non-Linear Colormap
Brought to you by:
cfeuersaenger,
ludewich
From: Joan H. <joa...@ou...> - 2015-08-10 21:39:13
|
Hey guys. I'm interested in pgfplots in order to generate a non-linear colormap. Is there a way to get the following example to work without doing lots of "hacks"? Kind regards, Joan \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{figure*}[!t] \centering \begin{minipage}[c]{\textwidth} \begin{tikzpicture} \pgfplotsset{ colormap={myNewColor}{[5pt] rgb255(0pt)=(255,0,0); rgb255(511pt)=(0,255,10); rgb255(550pt)=(0,255,0); rgb255(789pt)=(100,255,0); rgb255(1000pt)=(0,0,255)} } \footnotesize \begin{axis}[ hide axis, scale only axis, height=0pt, width=0pt, colorbar horizontal, point meta min=-1, point meta max=1, colorbar style={ height=0.5cm, width=6cm, xtick={-1,0,1} }] \addplot [draw=none] coordinates {(0,0)}; \end{axis} \end{tikzpicture} \end{minipage} \caption{aaa} \end{figure*} \end{document} |