且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法使用调色板用颜色填充对象

更新时间:2023-01-27 14:43:41

使用绘制boxxyerror 样式,并填充框:

set size ratio -1
set style fill solid
plot 'file.dat' using 1:2:(0.1):(0.1):3 linecolor palette with boxxyerror

$ b填充实线
图'file.dat'
$ b

这将在第一列和第二列给出的每个位置上绘制一个大小为0.2的正方形。颜色取自第三列,并映射到当前调色板。您必须使其适应实际的数据格式。

This would plot a square of size 0.2 at each position given by the first and second columns. The color is taken from the third column and mapped to the current palette. You must adapt that to your actual data format.

使用随机伪数据('+')的工作示例:

Working example using random pseudo-data ('+'):

set xrange [-0.05:1.05]
f = "int(rand(0) * 20)/20.0"
set style fill solid
set size ratio -1
plot '+' using (@f):(@f):(0.025):(0.025):(@f) linecolor palette notitle with boxxyerror