[Matplotlib-users] Controlling the number of displayed digits in time axis labels

Thomas Caswell tcaswell at gmail.com
Mon Nov 7 23:47:04 EST 2016

The defaults will be improved in 2.0 (see

Can you provide a more complete example of what you are doing that is not


On Mon, Nov 7, 2016 at 11:31 PM William Ray Wing <wrw at mac.com> wrote:

> I need to plot some time series data in which the time axis is specified
> by numpy/pandas 64-bit date-time values.  I’m only interested in hours,
> minutes, and seconds, and the seconds value is only accurate to
> hundredths.  I’m formatting the time axis as:
> x_format = mathplotlib.dates.DateFormatter('%H:%M:%S’)
> which gives me hours, minutes, and seconds, BUT gives me six digits of
> bogus precision after the seconds decimal point.  Is there any way to
> truncate those six digits to three.  I’ve tried several Google searches,
> but have been unsuccessful in coming up with anything.
> Thanks,
> Bill
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20161108/bb015e54/attachment.html>

More information about the Matplotlib-users mailing list