jcvi.py 文件源码

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

项目:tredparse 作者: humanlongevity 项目源码 文件源码
def fontprop(ax, name, size=12):

    assert name in available_fonts, "Font must be one of {0}.".\
            format(available_fonts)

    import matplotlib.font_manager as fm

    fname = op.join(datadir, name)
    prop = fm.FontProperties(fname=fname, size=size)

    logging.debug("Set font to `{0}` (`{1}`).".format(name, prop.get_file()))
    for text in ax.texts:
        text.set_fontproperties(prop)

    return prop
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号