GNUPLOT:如何设置反向HOT调色板

时间:2014-04-16 19:34:22

标签: colors gnuplot palette

以下是http://gnuplot.sourceforge.net/demo/pm3dcolors.html

中的示例
set palette rgb 21,22,23; set title "hot (black-red-yellow-white)";

上面的代码设置了热调色板。但是,我想要一个反向热调色板,说:

白 - 黄 - 红黑色。

小的最小值映射到白色,最大值映射到黑色。

2 个答案:

答案 0 :(得分:11)

Miguel的回答是正确的。而不是使个别数字为负数,命令set palette negative也可以解决问题:

set pm3d map
set palette negative rgb 21,22,23
splot x

会产生你想要的东西。您也可以拆分命令:

set palette rgb 21,22,23
set palette negative

是等价的。您可以使用set palette positive撤消此修改,或set palette恢复所有默认值(包括颜色)。请尝试help set palette获取您可以执行的完整列表。

答案 1 :(得分:5)

使用负数反转调色板:

set pm3d map
set palette rgb 21,22,23
splot x

给你

enter image description here

,而

set pm3d map
set palette rgb -21,-22,-23
splot x

给你

enter image description here

相关问题