利用python pyheatmap包绘制热力图,供大家参考,具体内容如下
import matplotlib.pyplot as plt
from pyheatmap.heatmap import HeatMap
def plot_data(filename):
with open(filename,'r') as fh:
data=fh.read().split('\n')
xs = []
ys = []
data_test=[]
for line in data:
line=line.strip().split()
if len(line)>3:
opt,
1