パーセンタイルをそのままグラフに書いてみました。
望んでいるものではないかもしれません。
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
# 数学の点数
math = np.array([74, 65, 40, 62, 85, 67, 82, 71, 60, 99])
# 箱ひげ図
fig, ax = plt.subplots()
ax.boxplot(math)
ax.set_xticklabels(['math'])
percentile = np.percentile(math, q=[0, 25, 50, 75, 100])
for p in percentile:
ax.text(1.1, p, p, va='center')
Like!