我知道在gnuplot中可以使用圆圈作为绘图的点来绘制一些数据:
plot 'data.txt' using 1:2 ls 1 with circles
我该如何设置圆的大小?我想绘制几组数据,但每组数据的圆的大小都不同。
If you have a third column in your data, the third column specifies the size of the circles. In your case, you could have the third column have the same value for all the points in each data set. For example:
plot '-' with circles
1 1 0.2
e
这将在坐标(1,1)处以半径0.2的大小绘制一个圆。请注意,半径与数据具有相同的单位。(特殊文件名“-”允许您直接输入数据;键入“e”结束输入。在gnuplot控制台上键入help special
以获取更多信息。)
您可以在此处查看更多关于如何使用圆的示例。
plot 'datafile' u 1:2:(1.5) w circles
。这将创建半径为1.5的圆形(并且数据文件中只需要两列数据)。你的数据集在文件中是如何分隔的?如果它们由两个空行分隔,那么你可以使用伪列-2来选出索引号。 - mgilsonplot '-'
功能的几句话可以帮助理解这里正在发生什么:打开了一个“数据输入控制台”... - Wolf我使用了:
plot "file" using 1:2:($2*0+10) with circles
这将伪造第三列指定的尺寸 - 可能有更简单的写法,但这对我有效。
using 1:2:(10)
即可。 - Christoph