From: John H. <jdh...@ac...> - 2005-03-30 16:17:02
|
>>>>> "Jessika" == Jessika Chumak <eli...@ya...> writes: Jessika> hours = HourLocator() minutes = MinuteLocator() timeFmt = Jessika> DateFormatter('%H:%M') Jessika> ax.xaxis.set_major_locator(hours) Jessika> ax.xaxis.set_minor_locator(minutes) Jessika> ax.xaxis.set_minor_formatter(timeFmt) Jessika> ax.autoscale_view() Jessika> Am I too far off target here? Because I can't get it to Jessika> work. Jessika> I've also looked at the user's manual (5.4 example 2: Jessika> date ticking). Could someone please point me in the Jessika> right direction or provide an example of how it _should_ Jessika> be done? Thank you in advance. All of the date ticker locators accept ranges to indicate where you want the ticks. See, eg, http://matplotlib.sourceforge.net/matplotlib.dates.html#MinuteLocator To tick every 5 minutes, just give the range of minutes you want ticked loc = MinuteLocator(range(5,60,5)) # don't tick on 0 and 60 loc = MinuteLocator(range(0,61,5)) # tick on 0 and 60 as well The default is to tick on every minute... JDH |