python boxplot show mean

Solutions on MaxInterview for python boxplot show mean by the best coders in the world

showing results for - "python boxplot show mean"
Lucas
06 Jul 2020
1import matplotlib.pyplot as plt
2import numpy as np
3
4data_to_plot = np.random.rand(100,5)
5
6fig = plt.figure(1, figsize=(9, 6))
7ax = fig.add_subplot(111)    
8bp = ax.boxplot(data_to_plot, showmeans=True)
9
10plt.show()