I've found the solution. MonthLocator doesn't support the bysetpos
argument that rrule can use. Thankfully from my POV the following two
lines give me exactly what I want.
rule = rrulewrapper(MONTHLY, bymonthday=(firstDate.day, -1), bysetpos=1)
majorLocator = RRuleLocator(rule)
Just wish I'd
Sadly no :( I want the day of the month that I'm processing *OR* the
last day. The worst case for this is obviously the 31st of each month.
The rrule code I've given provides exactly that. When transferred to
mpl that doesn't work.
On 04/04/2013 17:31, Phil Elson wrote:
> Hi Mark,
>
> Than
Hi Mark,
Thanks for persevering :-)
What is it you want to achieve? Is it that you just want the last day of
each month as the located value?
Changing your locator to:
ax.xaxis.set_major_locator(MonthLocator(bymonthday = -1))
Seems to do the trick for me (I've never looked at the mpl date magi
On 01/04/2013 14:48, Mark Lawrence wrote:
> On 29/03/2013 15:49, Mark Lawrence wrote:
>> Hi all,
>>
>>From http://labix.org/python-dateutil
>>
>> "To generate a rrule for the use case of "a date on the specified day of
>> the month, unless it is beyond the end of month, in which case it will
>>
On 29/03/2013 15:49, Mark Lawrence wrote:
> Hi all,
>
> From http://labix.org/python-dateutil
>
> "To generate a rrule for the use case of "a date on the specified day of
> the month, unless it is beyond the end of month, in which case it will
> be the last day of the month" use the following:
>
Hi all,
From http://labix.org/python-dateutil
"To generate a rrule for the use case of "a date on the specified day of
the month, unless it is beyond the end of month, in which case it will
be the last day of the month" use the following:
rrule(MONTHLY, bymonthday=(some_day, -1), bysetpos=1)