#绘制柱状图
import matplotlib.pyplot as plt
import numpy as np
x=[1,2,3,4,5,6]
y=[3,4,5,6,7,8]
c=np.mean(y)
plt.bar(x,y,color="red",hatch="/",tick_label=["q","er","jjd","dd","kk","dd"])
plt.xlabel("x-axis",fontsize=15)
plt.ylabel("y-axis",fontsize=15)
plt.title("bar",fontsize=15)
plt.axhline(y=c,color="blue")
plt.show()

相关文章:

  • 2021-04-19
  • 2021-06-21
  • 2021-12-27
  • 2022-01-02
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
猜你喜欢
  • 2021-04-26
  • 2021-09-14
  • 2022-12-23
  • 2021-12-01
  • 2022-12-23
  • 2021-05-11
  • 2022-02-04
相关资源
相似解决方案