plots.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:lehrex 作者: lkluft 项目源码 文件源码
def set_date_axis(ax=None, dateformat='%d.%m.'):
    """Set DateFormatter for given AxesSubplot.

    Parameters:
        ax (AxesSubplot): Matplotlib axes.
        dateformat (str): Format string for date labels on xaxis.
    """
    if ax is None:
        ax = plt.gca()

    formatter = dates.DateFormatter(dateformat)
    ax.xaxis.set_major_formatter(formatter)
    ax.grid('on', which='both', linestyle='-')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号