Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
80 views
in Technique[技术] by (71.8m points)

python - matplotlib configuration file and style sheets

I can check the location of my matplotlib configdir via

import matplotlib as mpl
mpl.get_configdir()

If I now place my matplotlibrc in mpl.get_configdir() I expect it to be loaded with the changes applied to plots if the following points to the desired matplotlibrc

mpl.matplotlib_fname()

However, it seems not all changes are applied. Most notably font size changes are missing, while e.g. facecolor changes are applied.

If I load the matplotlibrc via

mpl.pyplot.style.use(mpl.matplotlib_fname())

Everything seems to work as expected.

What am I missing here?

It shouldn't matter, but I tested this in a jupyter notebook. In addition, the matplotlibrc seems not to be reloaded after I change something. Is there a way around it?

question from:https://stackoverflow.com/questions/65951177/matplotlib-configuration-file-and-style-sheets

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...