我没有设法在没有周末的情况下绘制matplotlib.finance.candlestick(每5个烛台之间有空格).来自Matplotlib网站的示例也不排除周末,并且在其他地块上排除周末的方式似乎不适用于CandleSticks.
以前有人遇到过这个吗?
PS.根据要求,这是一个例子:
#!/usr/bin/env python
from pylab import *
from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \
DayLocator, MONDAY
from matplotlib.finance import quotes_historical_yahoo, candlestick,\
plot_day_summary, candlestick2
# (Year, month, day) tuples suffice as args for quotes_historical_yahoo
date1 = ( 2004, 2, 1)
date2 = ( 2004, 4, 12 )
mondays = WeekdayLocator(MONDAY) # major ticks on the mondays
alldays = DayLocator() # minor ticks on the days
weekFormatter = DateFormatter('%b %d') # Eg, …Run Code Online (Sandbox Code Playgroud)