diff --git a/Stoner/plot/formats.py b/Stoner/plot/formats.py index 8c911b81c..27cd8de4f 100755 --- a/Stoner/plot/formats.py +++ b/Stoner/plot/formats.py @@ -292,6 +292,8 @@ def __setattr__(self, name, value): """Ensure stylesheet can't be overwritten and provide magic for template attributes.""" if name.startswith("template_"): attrname = _add_dots(name[9:]) + if attrname not in plt.rcParams.keys(): + raise AttributeError(f"{attrname} is not an attribute of matplotlib.rcParams!") plt.rcParams[attrname] = value super().__setattr__(name, value) else: diff --git a/requirements.txt b/requirements.txt index 30771ad7d..c25c45bd1 100755 --- a/requirements.txt +++ b/requirements.txt @@ -17,3 +17,4 @@ multiprocess>=0.70 dill>=0.2.8 urllib3>=1.26 dateutil>=2.8 +seaborn>=0.13 \ No newline at end of file diff --git a/tests/test-env.yml b/tests/test-env.yml index 9a94ce969..e7d4adc0d 100755 --- a/tests/test-env.yml +++ b/tests/test-env.yml @@ -33,3 +33,4 @@ dependencies: - python-dateutil >=2.8 - hyperspy - fabio + - seaborn >=0.13