如何在 gnuplot 中制作聚集的行堆叠条?它知道如何获得一个集群条,但不知道如何获得一个行堆叠条的集群。谢谢!
编辑:在集群中,堆叠条也应该使用不同的颜色/图案。
If I understand the original post right, it should be easy to accomplish with gnuplot if you can preprocess your data to offset x coordinates of specific data series.
To illustrate the approach I will use the following data in 3 data series:
# impulse.dat
0.9 1
1.9 4
2.9 3
3.9 5
1.0 1
2.0 2
3.0 4
4.0 2
1.1 3
2.1 3
3.1 5
4.1 4
Here each series has x-coordinates shifted by .1
. To plot it I choose impulses of width 10.
plot [0:5] [0:6] 'impulse.dat' ind 0 w imp lw 10, \
'impulse.dat' ind 1 w imp lw 10, \
'impulse.dat' ind 2 w imp lw 10
Edit: to combine this with Matt's suggestion to use boxes would definitely be better:
set boxwidth 0.1
set fill solid
plot [0:5] [0:6] 'impulse.dat' ind 0 w boxes,\
'impulse.dat' ind 1 w boxes, \
'impulse.dat' ind 2 w boxes
Following is the picture with impulses.
我不完全确定如何去做,但是,一个想法是让盒子相互接触
`set boxwidth 1`
这还不能让你看到一个“聚集”的外观——为了得到一个聚集的外观,我认为你需要插入一行(可能是列)零......(我还没有对那个进行排序)我的头)进入你想要集群中断的数据文件。
当然,我想你也不需要设置 boxwidth...clustered 只是取决于偶尔打破...