matplotlibpython-3.5python-3.6fedora-25

export matplotlib setup 1.5 to 2.0


I have moved to Fedora 25 to Fedora 26(Linux, just for the information). In the process there are some changes in matplotlib as well.

In Fedora 25:

In Fedora 26:

The code to create these two image is same (just copied from one machine to another.). You can see that

I understand those changes are due to changes in matplotlib style. Is there any way to export all the configurations from matplotlib 1.5 to matplotlib-2, which will yield exact figure?


Solution

  • Try:

    mpl.style.use('classic')
    

    at the top.

    This is mentioned at the official site here (within the introduction)

    (Of course you could also downgrade your matplotlib. The question then is if there is a ready binary in fedora's packages or if you would need pip install; on a linux system, the latter should not hurt too much in terms of install-pain)