
내 문서 중 하나에 대한 색상맵을 만들려고 합니다. 이 컬러맵이 어떻게 보이는지 테스트하고 확인하기 위해 다음 \pgfplotscolorbardrawstandalone
명령을 사용합니다.
그러나 이 명령을 사용하면 빨간색이어야 하는 컬러맵의 위쪽 부분이 회색으로 표시됩니다. 반면에 그래프에서 색상맵을 사용하면 색상이 정확합니다. (미리 정의된 색상 맵과 동일합니다.)
문제가 무엇인지 아시나요? 명령
에 옵션을 추가해야 합니까 \pgfplotscolorbardrawstandalone
?
\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{colormap={mycolormap}{
rgb255=(80,80,80)
rgb255=(255,255,255)
rgb255=(230,40,25)
},
}
\begin{document}
\pgfplotscolorbardrawstandalone[colormap name=mycolormap]
\begin{tikzpicture}
\begin{axis}[hide axis, colormap name=mycolormap]
\addplot3[surf, samples=50, domain=-8:8]
{sin(deg(sqrt(x^2+y^2)))/sqrt(x^2+y^2)};
\end{axis}
\end{tikzpicture}
\pgfplotscolorbardrawstandalone[colormap name=viridis]
\begin{tikzpicture}
\begin{axis}[hide axis, colormap name=viridis]
\addplot3[surf, samples=50, domain=-8:8]
{sin(deg(sqrt(x^2+y^2)))/sqrt(x^2+y^2)};
\end{axis}
\end{tikzpicture}
\end{document}