import matplotlib.pyplot as plt import random import numpy as np import pandas as pd def MaxMinNormalization(x,Max,Min): x = (x - Min) / (Max - Min); return x/3.00124732715609 def graphpic(w,h,p,q,list66,listgg): sx = 0 num = 2 sy = 0.2 + 4* (h + q) sum = 0 for i,kkk in zip(list66,listgg): if i==0: rect3 = plt.Rectangle((sx, sy), w+p, h+q, color='tomato',alpha=0.6) ax.add_patch(rect3) elif i==3: rect3=plt.Rectangle((sx, sy), (w+p), h+q, color='lime',alpha=0.6) ax.add_patch(rect3) else: rect3 = plt.Rectangle((sx, sy), (w+p), h + q, color='tan',alpha=0.6) ax.add_patch(rect3) sum+=kkk sx+=(w+p) #q=2*q def graphpic2(w,h,p,q,list66,listgg): sx = 0 num = 2 sy = 0.2 + 3 * (h + q) sum = 0 for i,kkk in zip(list66,listgg): if i==0: rect3 = plt.Rectangle((sx, sy), w+p, h+q, color='tomato',alpha=0.6)
基于python matplotlib的应用
猜你喜欢
转载自blog.csdn.net/zhuiyunzhugang/article/details/105033930
今日推荐
周排行