2017-09-11 6 views

답변

1

figaxobject oriented interface의 일부이며 가능한 한 자주 사용되어야합니다.

도 대부분의 경우 이전 plt 인터페이스가 작동을 사용하여,하지만 당신은 만들고 조작 많은 수치를하거나 모든 수치를 추적하는 것은 매우 까다로운 될 수 축을 때

plt.figure() 
plt.plot(...)  # this implicitly modifies the axis created beforehand 
plt.xlim([0, 10]) # this implicitly modifies the axis created beforehand 
plt.show() 

비교

fig, ax = plt.subplots(1, 1) 
ax.plot(...)   # this explicitly modifies the axis created beforehand 
ax.set_xlim([0, 10]) # this explicitly modifies the axis created beforehand 
plt.show()