2014-12-01 3 views
0

나는 여러 매개 변수를 조합하는 매우 기본적인 플롯을 플롯하려하고있다. 이것은 내가 얼마나 멀리 왔는지입니다. 나는이 일을하기 위해 "도끼"를 생성 할Matplotlib : figure, xaxis, minor_locator, major_locator를 조합하다

fig=plt.figure(figsize=(50,18), dpi=60) 
dax_timeseries_xts.plot(color="blue", linewidth=1.0, linestyle="-", label='DAX') 
# dax_timeseries_xts is a XTS with dates as index 

ax.xaxis.set_minor_locator(dates.WeekdayLocator(byweekday=(1),interval=1)) 
ax.xaxis.set_minor_formatter(dates.DateFormatter('%d\n%a')) 
ax.xaxis.grid(True, which="minor") 
ax.yaxis.grid() 
ax.xaxis.set_major_locator(dates.MonthLocator()) 
ax.xaxis.set_major_formatter(dates.DateFormatter('\n\n\n%b\n%Y')) 
plt.tight_layout() 
plt.show() 

: 불행하게도 문서와 예제 내 문제를 포함하지 않는 이유는 무엇입니까? 어쩌면 위에 나열된 인수를 함께 사용하여 차트를 만들지 못하고 있습니까?

답변

0
fig, ax_f = plt.subplots(nrows=1, ncols=1) 

는 축 당신에게 답장을 보내

+0

감사를 줄 것이다. 나는 지금 도끼를 가지고있다. 그러나 figure 명령은 이제는 더 이상 작동하지 않습니다. – caliph

+0

@caliph이 대답의 줄은 * 당신의 figure 명령을 대체 할 것입니다 (이 키워드들도 이것들과 함께 작동합니다) – Ajean

+0

감사 : 사용 된 무화과, ax_f = plt.subplots (nrows = 1, ncols = 1, figsize = (100,18), dpi = 60) 이제 모든 문제가 해결되었습니다! – caliph

관련 문제