matplotlibを使って箱ひげ図+αを作成したい
python, matplotlibライブラリのみを使って, 少し手のこんだ箱ひげ図を作成していきます.
import matplotlib.pyplot as plt
a = [100, 1000, 2000, 3000, 10000, 20000, 30000, 100000, 200000, 1000000]
b = [100, 1000, 2000, 3000, 10000, 20000, 30000, 100000, 200000, 1000000]
points = (a, b)
fig, ax = plt.subplots()
ax.boxplot(points)
ax.set_xticklabels(['a', 'b'])
ax.plot(1, 19243, marker='x', color='red')
ax.plot(2, 1025, marker='o', color='blue', fillstyle='none')
plt.title('Box plot')
plt.xlabel('x')
plt.ylabel(…