Skip to content

Commit

Permalink
Image tests: set agg backend after rcdefaults (#3846)
Browse files Browse the repository at this point in the history
* image tests: set agg after rcdefaults

* add comments
  • Loading branch information
rcomer authored Sep 16, 2020
1 parent 227e708 commit e524958
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/iris/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@
try:
import matplotlib

matplotlib.use("agg")
# Override any user settings e.g. from matplotlibrc file.
matplotlib.rcdefaults()
# Set backend *after* rcdefaults, as we don't want that overridden (#3846).
matplotlib.use("agg")
# Standardise the figure size across matplotlib versions.
# This permits matplotlib png image comparison.
matplotlib.rcParams["figure.figsize"] = [8.0, 6.0]
Expand Down

0 comments on commit e524958

Please sign in to comment.