gnuplot 热图:数据出现“倾斜”
我需要一些帮助
我有一个巨大的文件,其中包含 256 个频率,其幅度每 3 秒一次,这意味着对于每个特定时间(即 18:04:01),有 256 行。第一列是时间:YYYY-MM-DD-HH-MM-SS,第二列是频率,第三列是幅度值。每列都用空格分隔
2022-02-27-18:39:57 1.823047180175781250e+02 -4.882478713989257812e+01
*<256 lines>*
2022-02-27-18:39:57 1.6047180175781250e+02 -4.882478713989257812e+01
2022-02-27-18:39:54 1.823047180175781250e+02 -4.533270263671875000e+01
*<256 lines>*
2022-02-27-18:39:54 1.6047180175781250e+02 -4.882478713989257812e+01
这是我用来绘制此图的 gnuplot 代码:
clear
reset
reset session
set timestamp "Generated: %Y-%m-%d %H:%M:%S" top font 'Arial,16'
set datafile separator " "
set datafile missing "nan"
set term pngcairo
set terminal png size 1500,800
set title "$systemName \n \nSpectrum\n Most recently appended: $file_most_current_pwr" font 'Consolas,19' noenhanced
set cblabel "Amplitude dB" offset 3 font 'Consolas, 15'
set cbtics scale 0 font 'Arial,16'
#set cbrange [:-40]
set palette rgbformulae 22,13,-31
unset key
set timefmt "%Y-%m-%d-%H:%M:%S"
set xdata time
set format x "%H:%M:%S"
set ylabel 'MHz' font 'Arial,19' offset 0,2
set xlabel 'Time' font 'Arial,19'
set output "/var/www/html/and_power_plot.png"
plot "/var/www/html/Data_Archive/current_master_PWR_data.txt" using 1:2:3 with image
但是,我得到的热图看起来“倾斜”。此外,当我将更多数据附加到文件时,我收到此错误:
Visible pixel grid has a scan line longer than previous scan lines
这是图表:
建议吗?
I need some help
I have huge file that contains 256 frequencies with their amplitudes every 3 seconds, meaning for each specific time (i.e. 18:04:01), there is 256 lines. The first column is the time: YYYY-MM-DD-HH-MM-SS, the second columns is the frequency, and the third column is the amplitude value. Each column is separated with a space
2022-02-27-18:39:57 1.823047180175781250e+02 -4.882478713989257812e+01
*<256 lines>*
2022-02-27-18:39:57 1.6047180175781250e+02 -4.882478713989257812e+01
2022-02-27-18:39:54 1.823047180175781250e+02 -4.533270263671875000e+01
*<256 lines>*
2022-02-27-18:39:54 1.6047180175781250e+02 -4.882478713989257812e+01
Here is the gnuplot code that I am using to plot this:
clear
reset
reset session
set timestamp "Generated: %Y-%m-%d %H:%M:%S" top font 'Arial,16'
set datafile separator " "
set datafile missing "nan"
set term pngcairo
set terminal png size 1500,800
set title "$systemName \n \nSpectrum\n Most recently appended: $file_most_current_pwr" font 'Consolas,19' noenhanced
set cblabel "Amplitude dB" offset 3 font 'Consolas, 15'
set cbtics scale 0 font 'Arial,16'
#set cbrange [:-40]
set palette rgbformulae 22,13,-31
unset key
set timefmt "%Y-%m-%d-%H:%M:%S"
set xdata time
set format x "%H:%M:%S"
set ylabel 'MHz' font 'Arial,19' offset 0,2
set xlabel 'Time' font 'Arial,19'
set output "/var/www/html/and_power_plot.png"
plot "/var/www/html/Data_Archive/current_master_PWR_data.txt" using 1:2:3 with image
However, I am getting a heatmap that looks "slanted". In addition, I received this error when I append further data to the file:
Visible pixel grid has a scan line longer than previous scan lines
Here is the graph:
Any advice ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,事实证明数据每行之间必须有一个空行,例如,而不是:
需要像这样:
Ok, so it turns out that the data has to have a blank line between each line, for example, instead of:
needs to be like this: