如何在更改方向时从矩阵数据文件中管理xtics,ytics

时间:2015-12-10 09:56:34

标签: gnuplot

我想绘制一个矩阵组织数据的大文件(文件中有200行×6000列)。 数据是无线电信号上FFT的输出,频率范围为18至24 MHz,每个6000 KB,1KHz。 该文件还包含行和列的标题信息:1个顶行,其中包含6000个频率的列表,以及每个行开始时的一个日期时间,用于采集时间戳。 结果图如下: enter image description here

在gnuplot中获得这些陈述:

set datafile separator ","
set ticslevel 0
plot 'test3.mat' matrix rowheaders columnheaders using 1:2:3 with image

对于我的计划用法,我需要将其水平定向,如下所示,但只有数据旋转,而所有行和列tics现在都在错误的轴上。 enter image description here

以这种方式改变绘图语句获得的数据轮换:

plot 'test3.mat' matrix rowheaders columnheaders using 2:1:3 with image

有办法:

  • “旋转”也可以将它们放在正确的轴上(y上的频率和x上的时间)
  • 并减少图表上使用的抽动数量,以避免文字的丑陋重叠

使用评论中的信息进行了其他测试:

TEST 1 有了这个,我看到了抽搐,但根本没有热图(+这个消息:“警告:图像网格必须至少为2 x 2 ”)

plot 'test3.mat' matrix nonuniform using 2:1:3 with image

enter image description here

TEST 2 使用新文件(没有标题/时间戳)我几乎得到了所需的结果。 x轴仍然是错误的,我想要一种更简单的方法来产生抽动值。

set datafile separator ","
set ticslevel 0

set timefmt '%Y-%m-%d %H:%M:%S'
set xdata time
set format x "%H:%M:%S"

set format y "%.1s"

set autoscale xfix
set autoscale yfix

plot 'test3-nohead.mat' matrix using ("2015-12-03 15:08:39"+0.05*$2):(18000000.0+1000.0*$1):3 with image

enter image description here

0 个答案:

没有答案