- 积分
- 3995
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2016-3-4
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from matplotlib import colors
rows = pd.read_csv('E:/ZP2020-02-01_00-01-10LV2.csv',
encoding='gbk', header= None, skiprows=3)
df = rows.iloc[0:10:1, 11:12:1]
df1 = rows.iloc[10:20:1, 11:12:1]
df2 = rows.iloc[20:30:1, 11:12:1]
。。。。。。
U1 = np.concatenate((df, df1, df2), axis=1)
print(U1)
cmap = colors.ListedColormap(['blue', 'deepskyblue','cyan','lightcyan','gold','salmon'])
bounds=[0,1,2,3,4,17,30]
norm = colors.BoundaryNorm(bounds, cmap.N)
data = U1
sns_plot=sns.heatmap(data, cmap=cmap, norm=norm, linecolor='k', linewidths = 0.1, annot=True, cbar=False)
|
|