- Matplotlib 3.0 Cookbook
- Srinivasa Rao Poladi
- 63字
- 2025-04-04 16:06:37
There's more...
In plt.boxplot(), by specifying the showfliers=False argument, you can suppress the outliers, so it plots only up to the whiskers on both sides. By specifying the vert=False argument, you can plot the box plots horizontally, and outliers can also be customized with different shapes and colors:
plt.boxplot(data, vert=False, flierprops=dict(markerfacecolor='r',
marker='D'))
plt.show()
You should see the following output:
