Python 一个matplotlib样式文件可以从另一个继承值吗?

Python 一个matplotlib样式文件可以从另一个继承值吗?,python,matplotlib,Python,Matplotlib,假设我有一个matplotlib样式的文件base.mplstyle,其中包含多个规范 legend.fancybox: True legend.numpoints: 1 legend.frameon: True legend.framealpha: 0.8 legend.shadow: True text.color: white text.usetex: True figure.figsize : 9, 9 假设我想创建另一个样式文件small\u figure.mplstyle,该文件具

假设我有一个matplotlib样式的文件
base.mplstyle
,其中包含多个规范

legend.fancybox: True
legend.numpoints: 1
legend.frameon: True
legend.framealpha: 0.8
legend.shadow: True
text.color: white
text.usetex: True
figure.figsize : 9, 9
假设我想创建另一个样式文件
small\u figure.mplstyle
,该文件具有所有相同的设置,只保存一个:

legend.fancybox: True
legend.numpoints: 1
legend.frameon: True
legend.framealpha: 0.8
legend.shadow: True
text.color: white
text.usetex: True
figure.figsize : 2, 2 # <--- the only difference

样式表是为组合而设计的,因此您可以设置要以列表形式组合的样式。但是,请注意,它们将被更多右手样式的值覆盖

import matplotlib.pyplot as plt

plt.style.use(['base', 'small_figure'])

非常感谢。我不知道。知道列表的顺序很重要也很有趣,这很有道理,但很微妙
import matplotlib.pyplot as plt

plt.style.use(['base', 'small_figure'])