is it possible to plot timelines with matplotlib?

后端 未结 4 1904
孤街浪徒
孤街浪徒 2020-12-25 09:17

Im trying to plot dates with values like this csv.

Tue  2 Jun 16:55:51 CEST 2015,3
Wed  3 Jun 14:51:49 CEST 2015,3
Fri  5 Jun 10:31:59 CEST 2015,3
Sat  6 Jun         


        
4条回答
  •  误落风尘
    2020-12-25 09:38

    I use the broken_barh() API, something like:

    mycolors=deque(["#d24e32","#6a40c5","#59ba45",...])        
    
    # for each bar to draw
    ax.broken_barh([(x, w), ...], (y, h), color=mycolors, alpha=0.3, antialiased=True)
    
    mycolors.rotate(-1)
    

提交回复
热议问题