Colors Gnuplot颜色梯度

Colors Gnuplot颜色梯度,colors,gnuplot,gradient,Colors,Gnuplot,Gradient,我需要在我的绘图中创建一些垂直渐变-总共四个,以澄清方向(N、E、S、W) 我是不是遗漏了什么? 提前感谢您不能用渐变填充矩形。调色板仅影响打印的函数或数据集。可以使用image或pm3d打印样式来执行此操作 一个例子: set samples 100 set isosample 100,100 set xrange [0:1] set yrange [0:1] set palette defined (0 "white", 1 "red") set autoscale cbfix unset

我需要在我的绘图中创建一些垂直渐变-总共四个,以澄清方向(N、E、S、W)

我是不是遗漏了什么?
提前感谢

您不能用渐变填充矩形。
调色板
仅影响打印的函数或数据集。可以使用
image
pm3d
打印样式来执行此操作

一个例子:

set samples 100
set isosample 100,100
set xrange [0:1]
set yrange [0:1]
set palette defined (0 "white", 1 "red")
set autoscale cbfix
unset colorbox
unset key

set multiplot layout 2,2   
plot '++' using 1:2:1 with image
plot '++' using 1:2:2 with image
plot '++' using 1:2:(-$1) with image
plot '++' using 1:2:(-$2) with image
unset multiplot
pngcairo终端和版本4.6.5的输出为:


现在,您必须找到一种方法将其与现有的其他绘图集成。

我正在使用X11终端-这需要任何其他规范吗?我看不到任何颜色与上述代码-猜测这是与终端类型?目前我只能测试的wxt和windows终端都工作。今晚我可以检查x11终端。你是如何运行代码的?在开始新的交互式会话之前,请先重置
,或者启动一个新的交互式会话,可能您有一些剩余的设置。好的-我看到x11终端中的颜色,所以您的代码示例可以工作。谢谢-我只是需要修改它以达到我的目的。我很难将代码示例吸收到我的脚本中。您能解释一下吗?-设置调色板定义(0“白色”,1“红色”)设置自动缩放cbfix unset colorbox unset键;使用1:2:($2)和图像绘制“++”
set samples 100
set isosample 100,100
set xrange [0:1]
set yrange [0:1]
set palette defined (0 "white", 1 "red")
set autoscale cbfix
unset colorbox
unset key

set multiplot layout 2,2   
plot '++' using 1:2:1 with image
plot '++' using 1:2:2 with image
plot '++' using 1:2:(-$1) with image
plot '++' using 1:2:(-$2) with image
unset multiplot