函数功能:绘制箱线图。

调用签名:plt.boxplot(x)

x:绘制箱线图的输入数据

代码实现:

import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np

mpl.rcParams["font.sans-serif"] = ["FangSong"]
mpl.rcParams["axes.unicode_minus"] = False

x = np.random.randn(1000)

plt.boxplot(x)

plt.xticks([1], ["随机数生成器AlphaRM"])
plt.ylabel("随机数值")
plt.title("随机数生成器抗干扰能力的稳定性")

plt.grid(axis="y", ls=":", lw=1, color="gray", alpha=0.4)

plt.show()

python可视化---箱线图boxplot()

相关文章:

  • 2022-02-04
  • 2021-05-11
  • 2022-12-23
  • 2021-06-16
  • 2021-04-04
  • 2022-01-19
  • 2022-12-23
猜你喜欢
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2021-04-20
相关资源
相似解决方案