Hi all, I am trying to figure out how I can limit the xaxis date ranges. I
tried set_xlim(), but that didn't work. The graph consists of dates for the
xaxis and data for the yaxis. Currently the xaxis is showing the entire
year's worth of months, even though there are no data for some months. This
plot is really close to what I want, however, I need to limit the xaxis to a
only a few months.
weeks = matplotlib.dates.WeekdayLocator() # every year
months = matplotlib.dates.MonthLocator() # every month
monthsFmt = matplotlib.dates.DateFormatter('%b')
fig = pylab.figure()
ax = fig.add_subplot(111)
ax.xaxis.set_major_locator(months)
ax.xaxis.set_major_formatter(monthsFmt)
ax.xaxis.set_minor_locator(weeks)
pylab.bar(x,y)
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users