Plot numpy datetime64 with matplotlib

前端 未结 3 1083
暗喜
暗喜 2020-12-03 05:17

I have two numpy arrays 1D, one is time of measurement in datetime64 format, for example:

array([2011-11-15 01:08:11, 2011-11-16 02:08:04, ..., 2012-07-0         


        
3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-03 05:23

    You might want to try this:

    plot_date(timeSeries, data)
    

    By default, the x axis will be considered a date axis, and y a regular one. This can be customized.

提交回复
热议问题