gnuplot - 带 pm3d 的总和调色板

标签 gnuplot gradient palette

在多重图中,我绘制了 3 个具有不同调色板颜色的 map (请参见下面的代码)。 我想要在多图的第四个方格中计算其他三个部分的总和,即红色部分、蓝色部分、绿色部分以及红色+蓝色+绿色的组合,具体取决于第 14、15 和 16 列的值。

set view map; set size square
set xlabel "delta mu Al"
set ylabel "delta mu Mn"
set zlabel "fraction atomique"

set multiplot layout 2,2
set title "Fer"
set palette defined (0 "white", 1 "red")
splot "res700.dat" u 3:4:($16/3456) t "Fe"  with pm3d

set title "Alu"
set palette defined (0 "white", 1 "green")
splot "res700.dat" u 3:4:($14/3456) t "Fe"  with pm3d

set title "Mn"
set palette defined (0 "white", 1 "blue")
splot "res700.dat" u 3:4:($15/3456) t "Fe"  with pm3d

unset multiplot

最佳答案

使用rgb变量。使用黑色作为无信号颜色,这给出:

set view map; set size square
set xlabel "delta mu Al"
set ylabel "delta mu Mn"
set zlabel "fraction atomique"

set isosample 100
Fe(x,y)=x*y
Al(x,y)=(1-x)*y
Mn(x,y)=x*(1-y)

set multiplot layout 2,2
set title "Fer"
set palette defined (0 "black", 1 "red")
splot [0:1][0:1] "++" u 1:2:(Fe($1,$2)) t "Fe"  with pm3d

set title "Alu"
set palette defined (0 "black", 1 "green")
splot [0:1][0:1] "++" u 1:2:(Al($1,$2)) t "Al"  with pm3d

set title "Mn"
set palette defined (0 "black", 1 "blue")
splot [0:1][0:1] "++" u 1:2:(Mn($1,$2)) t "Mn"  with pm3d

set title ""
rgb(r,g,b) = 65536 * int(255*r) + 256 * int(255*g) + int(255*b)
unset colorbox
splot [0:1][0:1] "++" u 1:2:(rgb(Fe($1,$2),Al($1,$2),Mn($1,$2))) t "" with pm3d lc rgb variable

unset multiplot

enter image description here

关于gnuplot - 带 pm3d 的总和调色板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36885606/

相关文章:

plot - gnuplot:分散数据集的等高线图

terminal - 如何在 Gnuplot 中启用 pngcairo 终端

python - 使 pyplot 比 gnuplot 更快

css - 如果浏览器支持 CSS3 媒体查询和 CSS3 渐变,我如何通过 JavaScript 检测?

android - 渐变色动画

android - 来自调色板的主题

GNUPLOT - 如何设置 Axis 中心数据的中值?

html - 基于渐变色标为许多 css 类定义颜色

java - 用于一对多映射的 Tapestry 组件

objective-c - 使调色板永久激活/聚焦?