[docs]classLegend(AbstractMatWrap):""" The settings used to include and customize a legend on a figure. This object wraps the following Matplotlib methods: - plt.legend: https://matplotlib.org/3.3.2/api/_as_gen/matplotlib.pyplot.legend.html """def__init__(self,label=None,include=True,**kwargs):super().__init__(**kwargs)self.label=labelself.include=includedefset(self):ifself.include:config_dict=self.config_dictconfig_dict.pop("include")if"include"inconfig_dictelseNoneconfig_dict.pop("include_2d")if"include_2d"inconfig_dictelseNoneplt.legend(**config_dict)