가로 막대 그래프를 만들었으니 이제 막대에 마커를 추가해야합니다. 그렇게하려면 어떻게해야합니까?어떻게 막대 그래프에 파이썬으로 마커를 추가 할 수 있습니까?
코드 지금까지 다음과 같습니다있다 :
def plot_comparison():
lengths = [11380, 44547, 166616, 184373, 193068, 258004, 369582, 462795, 503099, 581158, 660724, 671812, 918449]
y_pos = np.arange(len(length))
error = np.random.rand(len(length))
plt.barh(y_pos, length, xerr=error, align='center', alpha=0.4)
plt.yticks(y_pos, length)
plt.xlabel('Lengths')
plt.title('Comparison of different cuts')
plt.show()
의 사용 가능한 복제 [하기 matplotlib : 라인의 개별 포인트 설정 마커 (http://stackoverflow.com/questions/8409095/matplotlib-set-markers-for-individual-points -on-a-line) –
이 경우 막대 그래프에 표식을 배치해야합니다. – Sanchit795
마커는 줄이 그어진 그래프에만 사용할 수 있습니다. –