登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.rcParams['font.sans-serif']=['SimHei']
plt.rcParams['axes.unicode_minus'] = False
rows = pd.read_csv('E:\ZP2020-01-09_00-01-08LV2.csv', encoding='gbk',header= None, skiprows=3)
rows_t_slice = rows.iloc[0:2790:4, 11:59:1]
x = rows_t_slice.index.values
y = [0,25,50,75,100,125,150,175,200,225,250,275,300,325,350,375,400,425,450,475,500,550,600,650,700,750,800,850,900,950,1000,1050,1100,1150,1200,1250,1300,1350,1400,1450,1500,1550,1600,1650,1700,1750,1800,1850]
Y, X = np.meshgrid(y, x)
fig = plt.figure(figsize=(14, 14), dpi = 100)#声明画布与figure位置设置
fig.subplots_adjust(wspace=0.5, hspace=0.04,left=0.07, right=1.1, top=0.92, bottom=0.1)
plt.subplot(3, 1, 1)
t = np.arange(-60, 10, 3)
ct = plt.contourf(X, Y, rows_t_slice, t, cmap=plt.get_cmap('Reds'))
plt.clabel(ct,inline=1,inline_spacing=0,fontsize=8,fmt='%1.0f',colors='r')
cbt = plt.colorbar(ct)
plt.xticks([])
plt.yticks(fontsize=12)
plt.ylabel('Height/m', fontsize=12)
plt.title("The variation trend of microwave radiometer observation at Sky Jumping", fontsize=20)
rows_q_slice = rows.iloc[1:2791:4, 11:59:1]
plt.subplot(3, 1, 2)
q = np.arange(0, 2, 0.1)
cq = plt.contourf(X, Y, rows_q_slice, q, cmap=plt.get_cmap('Blues'))
plt.clabel(cq,inline=1,inline_spacing=0,fontsize=8,colors='b')
cbq = plt.colorbar(cq)
plt.xticks([])
plt.yticks(fontsize=12)
plt.ylabel('Height/m', fontsize=12)
rows_r_slice = rows.iloc[2:2792:4, 11:59:1]
plt.subplot(3, 1, 3)
r = np.arange(30, 100, 5)
cr = plt.contourf(X, Y, rows_r_slice, r, cmap=plt.get_cmap('Greens'))
plt.clabel(cr,inline=1,inline_spacing=0,fontsize=8,fmt='%1.0f',colors='g')
cbr = plt.colorbar(cr)
plt.xticks([0,120,240,360,480,600,720,840,960,1080,1200,1320,1440,1560,1680,1800,1920,2040,2160,2280,2400,2520,2640,2760],['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'],fontsize=12)
plt.yticks(fontsize=12)
plt.xlabel('Time/h', fontsize=12)
plt.ylabel('Height/m',fontsize=12)
|