0

I have two plots in a figure, for example

\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}
\pgfplotsset{compat=newest}
\begin{document}
  \begin{tikzpicture}
    \begin{axis}[colormap/hsv,point meta rel=per plot,colorbar]
      \addplot[mesh,domain=1:10,samples=20,] {20*x+10}; %positive value
      \addplot[mesh,domain=1:10,samples=20,] {-100};%negative value
    \end{axis}
  \end{tikzpicture}
\end{document}

The colorbar shows both the positive value and negative, but I want the colorbar only shows for the first plot. How can I do this?

Ice0cean
  • 1,646

0 Answers0