matplotlib / legend of x-axis

  • Thread starter Frédéric Degraeve
  • Start date
F

Frédéric Degraeve

Hi everybody,
I've got a problem concerning matplotlib/pylab. I use it to represent
curves. I will use these pictures in a report.
However, it writes me a string 'date' on the bottom of my x-axis.

I use this to produce my date axis (x-axis):

mondays = WeekdayLocator(MONDAY) # every monday
months = MonthLocator(range(1,13), bymonthday=1)
# every month
monthsFmt = DateFormatter("%b %d '%y")
years = YearLocator() # every month
yearsFmt = DateFormatter("%y")
# subplot.xaxis.set_major_locator(months)
# subplot.xaxis.set_major_formatter(monthsFmt)
# subplot.xaxis.set_minor_locator(mondays)
subplot.xaxis.set_major_locator(years)
subplot.xaxis.set_major_formatter(yearsFmt)

#subplot.autoscale_view()
setp(subplot.get_xticklabels(), 'rotation', 45, fontsize=10)


Can you help me to remove this 'date'?
thank you!

Frédéric
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top