Colors 如何在圆圈中绘制二维数据,其中半径表示第3列,颜色表示第4列?

Colors 如何在圆圈中绘制二维数据,其中半径表示第3列,颜色表示第4列?,colors,gnuplot,Colors,Gnuplot,下面是一个示例数据集 #x y r c 1 2 10 2 3 1 2 4 3 2 1 5 我可以用圆圈的半径表示第三列,或者用颜色表示第三列。然而,我不知道如何将它们都保留在情节中 这是我的代码,用半径表示第三列 plot 'rslt.log' u 1:2:3 w points pt 7 ps variable 尝试: 另一种选择是: plot 'test.dat' u 1:2:3:4 w p pt 7 ps variable lc variable 或使用“圆”线型: plot 'tes

下面是一个示例数据集

#x y r c
1 2 10 2
3 1 2 4
3 2 1 5
我可以用圆圈的半径表示第三列,或者用颜色表示第三列。然而,我不知道如何将它们都保留在情节中

这是我的代码,用半径表示第三列

plot 'rslt.log' u 1:2:3 w points pt 7 ps variable
尝试:

另一种选择是:

plot 'test.dat' u 1:2:3:4 w p pt 7 ps variable lc variable
或使用“圆”线型:

plot 'test.dat' u 1:2:3:4 w circles linecolor variable 
如果需要实心圆,请执行以下操作:

plot 'test.dat' u 1:2:3:4 w circles linecolor variable fillstyle solid

对于上述任何一种情况,您都可以按照@andyras的建议,用
linecolor调色板
替换
linecolor变量
。不同之处在于
调色板
将浮点数映射到调色板上,而
变量
将整数映射到具有关联颜色的线型

使用
ps variable
时,相关列中的数字将成为一个乘法因子,从而增加点的默认大小。对于圆,您可以自由指定圆的确切大小(作为半径)——尽管我不能100%确定在绘图的纵横比不是1的常见情况下使用哪个轴

plot 'test.dat' u 1:2:3:4 w circles linecolor variable fillstyle solid