matplotlib 기둥 모양도 관련 용법-bar ()

#encoding = utf-8#
 import numpy as np

matplotlib.pyplot이plt로 가져오기
fig.add_subplot(332
n = 10
 X = np.arange(n)
Y1 =(1 - X /  (N))* np.random.uniform(0.51.0,N)
Y2 =(1 - X /  (N))* np.random.uniform(0.51.0,N)
plt.bar(X,+ Y1,facecolor = '#9999ff'edgecolor = 'white'
plt.bar(X,-Y 2,facecolor = '#FF9999' edgecolor = ' '  X,Y   (X,Y1):
    plt.text(X + 0.4,Y + 0.05'%.2f'%Y,  = ' 'VA = ' '  X,Y   (X,Y2):
    plt.text(x + 0.4,-y- 0.05'% .2f '%y,ha = 'center'va = 'top'
plt.show()

좋은 웹페이지 즐겨찾기