我需要些帮助
我有一个巨大的文件,每3秒包含256个频率及其振幅,这意味着每一个特定的时间( 18:04:01),有256行。第一列是时间,第二列是频率,第三列是振幅值.每一列都用空格分隔。
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这是一个图表:
有什么建议吗?
发布于 2022-02-27 21:15:19
好的,因此数据必须在每一行之间有一个空行,例如,而不是:
2022-02-27-18:39:57 1.82000000000000e+02 -4.882478713989257812e+01
2022-02-27-18:39:57 1.70000000000000e+02 -3.8567889999398992e+01
2022-02-27-18:39:57 1.62300000000050e+02 -4.882478711568033333812e+01应该是这样的:
2022-02-27-18:39:57 1.82000000000000e+02 -4.882478713989257812e+01
2022-02-27-18:39:57 1.70000000000000e+02 -3.8567889999398992e+01
2022-02-27-18:39:57 1.62300000000050e+02 -4.882478711568033333812e+01https://stackoverflow.com/questions/71288288
复制相似问题