Matplotlib 2 inconsistent font

前端 未结 3 1043
情书的邮戳
情书的邮戳 2021-01-03 00:39

I updated Anaconda Python to the latest version (4.3), where they upgraded Matplotlib to version 2.

The upgrade has made some major changes to the default style (see

3条回答
  •  孤街浪徒
    2021-01-03 01:10

    From the link you did provide:

    A ‘classic’ style sheet is provided so reverting to the 1.x default values is a single line of python

    mpl.style.use('classic')

    Adding this line

    matplotlib.style.use('classic')
    

    to your script should solve your problem.

    I tested it on my python2.7/matplotlib 2, and it worked fine (i.e. I get back the matplotlib 1.x fonts).

提交回复
热议问题