![多个色彩图](https://linux22.com/image/295627/%E5%A4%9A%E4%B8%AA%E8%89%B2%E5%BD%A9%E5%9B%BE.png)
我想定义多个颜色图。但是当我尝试这样做时
\pgfplotsset{
colormap={something}{
color(0cm)=(blue);
color(1cm)=(orange!75!red)
}
colormap={somethingelse}{
color(0cm)=(white);
color(1cm)=(orange!75!red)
}
}
我收到一个错误。(这有效):
\pgfplotsset{
colormap={something}{
color(0cm)=(blue);
color(1cm)=(orange!75!red)
}
}
有任何想法吗?
答案1
这是拼写错误,因为键值语法中的选项需要用逗号分隔。这样就可以了;
\pgfplotsset{
colormap={something}{
color(0cm)=(blue);
color(1cm)=(orange!75!red)
},%<---- comma here
colormap={somethingelse}{
color(0cm)=(white);
color(1cm)=(orange!75!red)
}
}