From: John H. <jdh...@ac...> - 2004-09-15 12:16:32
|
>>>>> "James" == James Boyle <bo...@ll...> writes: James> I have been trying to use the plot_date of matplotlib James> (0.6.2.4) with limited success. Apparently, I must have James> some basic misconception as to what is going on. What I am James> try to do is plot data that has values every 6 hours with James> major ticks at each day and minor every 12 hours. Attached James> is my latest attempt. The basic problem is that the major James> and minor ticks do not line up. James> Thanks for any help. code and plot are below Hi Jim, You are using the constructor of DayLocator incorrectly. There are two day tickers. It's a bit confusing because the constructor of DayLocator takes an hour on which to place the tick, and DayMultiLocator takes an integer base and ticks days which are multiples of that base * DayLocator - locate a given hour each day * DayMultiLocator - Make ticks on day which are multiples of base When you say DayLocator(1), you are placing a tick every day *at 1am*. If you say DayLocator(5), the tick is at 5am. You want the default constructor DayLocator(), which places the tick at hour=0, midnight. Nice file name, by the way :-) JDH |