Time in x axis matplotlib overlap

前端 未结 1 976
野趣味
野趣味 2021-01-29 03:35

I plot bitrate in time with following function

#!/usr/bin/python3
import matplotlib.pyplot as plt
import datetime

def plotBitrate(time,bitrate,filename):
    ti         


        
相关标签:
1条回答
  • 2021-01-29 04:10

    The autofmt_xdate() is indeed a good way of preventing overlapping labels. However, pyplot does not have this method, instead, it's a method of figure.

    Therefore

    plt.gcf().autofmt_xdate()
    

    would do the job.

    0 讨论(0)
提交回复
热议问题