使用gnuplot绘制接收功率

使用gnuplot绘制接收功率,gnuplot,frequency,spectrum,Gnuplot,Frequency,Spectrum,我想画出不同无线信道的接收功率。对于每个通道,我有三个值,我想将它们堆叠起来 实际上,这是我的剧本: set boxwidth 0.6 relative set ylabel "dBm" set xlabel "Channel" set style fill solid set key off plot "RR1" using 1:2 with boxes, "RR2" using 1:2 with boxes, "RR3" using 1:2 with boxes 问题是,由于它们是负值(d

我想画出不同无线信道的接收功率。对于每个通道,我有三个值,我想将它们堆叠起来

实际上,这是我的剧本:

set boxwidth 0.6 relative
set ylabel "dBm"
set xlabel "Channel"
set style fill solid
set key off
plot "RR1" using 1:2 with boxes, "RR2" using 1:2 with boxes, "RR3" using 1:2 with boxes
问题是,由于它们是负值(dBm),它从0到找到的值进行绘图,因此最高的幂在顶部。我想画一个稍微相反的图像,蓝色框从下到上一直到它达到的值,其他两个值也是一样

有什么想法吗

我的数据是这样的

21.0 -93.9207
22.0 -92.241
23.0 -93.452

一种可能是使用
boxyErrorBars
打印样式:

reset
set ylabel "dBm"
set xlabel "Channel"
set style fill solid
set key off
set style data boxxyerrorbars

set xtics 1
set autoscale xfix
set offset 0.5,0.5,0,0

ylow = -100
plot for [i=3:1:-1] sprintf("RR%d", i) using 1:(0.5*($2+ylow)):(0.3):(0.5*($2-ylow)) lt i
在这里,我使用了一个固定的较低的
y
-值,但您也可以使用
stats
从数据文件中提取它,并进行一些其他调整

using
语句中,第二列给出方框中心,即实际
y
-值和下边界的平均值,第三列为
x
-δ(实际方框宽度的一半),第四列为
y

再加上一些数据值,可以得出:


这正是我想要的。非常感谢你!