Matplotlib can't find font

后端 未结 3 1032
我寻月下人不归
我寻月下人不归 2021-01-04 19:27

I am trying to draw an xkcd-style plot with matplotlib (ver. 1.4.2) under Python 3.

When I try to run:

import matplotlib.pyplot as plt
plt.xkcd()
plt         


        
3条回答
  •  逝去的感伤
    2021-01-04 20:11

    For Mac User: try to run this command in python: (or before the .py file)

    import matplotlib
    
    matplotlib.font_manager._rebuild()
    

提交回复
热议问题