【发布时间】:2015-09-22 08:22:03
【问题描述】:
我正在尝试绘制 RINEX (GPS) 数据,我对 Pandas 非常陌生,numpy。这是我的代码的 sn-p:
#Plotting of the data
pr1 = sat['P1']
pr2 = sat['P2']
calc_pr = pr1 - (((COEFF_3)**2) * pr2)
plt.plot(calc_pr,label='calc_pr')
其中“sat”是一个Dataframe,如下所示:
sat:
Panel: <class 'pandas.core.panel.Panel'>
Dimensions: 32 (items) x 2880 (major_axis) x 7 (minor_axis)
Items axis: G01 to G32
Major_axis axis: 0.0 to 23.9916666667
Minor_axis axis: L1 to S2
每个项目(G01、G02 等)对应的位置:
(G01)
DataFrame: L1 L2 P1 P2 C1 \
0.000000 669486.833 530073.330 24568752.516 24568762.572 24568751.442
0.008333 786184.519 621006.551 24590960.634 24590970.218 24590958.374
0.016667 902916.181 711966.252 24613174.234 24613180.219 24613173.065
0.025000 1019689.006 802958.016 24635396.428 24635402.410 24635395.627
在第一列中(我假设这是主轴,我使用:epoch_time = int((hour * 3600) + (minute * 60) + second))表示时间。这些是 30 秒的间隔,超过 24 小时。它们最初是纪元(0 到 2880)。第一个时期“calc_pr”如下所示:
Series: 0.000000 26529.507524
0.008333 31432.322196
0.016667 36336.563310
0.025000 41242.536096
0.033333 46149.208022
0.041667 51057.059006
0.050000 55965.873639
0.058333 60875.510720
0.066667 65785.965112
0.075000 70697.114838
但是,当绘制这些 (plt.plot(calc_pr,label='calc_pr')) 而不是 x 轴以小时为单位时,它以时期显示。我尝试过尝试操纵它的不同排列 "calc_pr" 以便显示时间,而不是纪元数,但到目前为止无济于事。有人可以指出我可以在哪里/如何操纵它吗?
【问题讨论】:
标签: python pandas gps dataframe series