Using latest matplotlib (0.91.1) and have two about date formatting.
The following two questions are put here in attempt to get a plot of a month
with days 1-31 neatly fit onto the x axis.

1.  Using DateFormatter class to format dates and am confused as
to how to set the axis properties like font size and font family of the
xtick labels.  The following type of thing (leaving out the most of the
code) does not work...

        daysFmt = DateFormatter('%d')
        ax.xaxis.set_major_locator(days)
        ax.xaxis.set_major_formatter(daysFmt)

        ax.xaxis.set_minor_locator(days2)
        ax.autoscale_view()
        ax.set_xticklabels(xdates,family='serif', fontsize=8)

...because when I put that last line I do get the font size changed
but I lose the date formatting via DateFormatter.  However if I put
only the .set_major_formatter(daysFmt) line, I get the right date
formatting...but how do I change the font?

2.  I want the plot to display, for example, the month of Jan,
with *only* days 1 - 31 shown on the x axis.   But if I use the
DateFormatter  (leaving out the  .set_xticklabels line), for the date
range given (days 1-31) it includes a couple of days on either side
of the plot (the 31st from the previous month and a day or two into
the following month).  How can I get it to display only 1-31?  And if I
do, will the  points plotted on day 1 and day 31 be halfway cut off
by th edges of the plot? (and is there any fix for that?)

Any help is appreciated.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to