import numpy as np import matplotlib.pyplot as plt size = 5 a = np.random.random(size) b = np.random.random(size) c = np.random.random(size) d = np.random.random(size) x = np.arange(size) total_width, n = 0.8, 3 # 有多少个类型,只需更改n即可 width = total_width /…