From 9abc39d2aa61920f5c0e8b28f1e7cc5e52fcc11a Mon Sep 17 00:00:00 2001 From: Marco Borelli Date: Sat, 1 Jun 2019 20:54:17 +0200 Subject: [PATCH] Remove warning about matplotlib fonts in BandsData.show_mpl() (#2902) Add DejaVu font as alternative, which is available by default on Ubuntu. --- aiida/orm/nodes/data/array/bands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiida/orm/nodes/data/array/bands.py b/aiida/orm/nodes/data/array/bands.py index a53942baa8..7e886764a0 100644 --- a/aiida/orm/nodes/data/array/bands.py +++ b/aiida/orm/nodes/data/array/bands.py @@ -1640,7 +1640,7 @@ def _prepare_json(self, main_file_name="", comments=True): from matplotlib import rc # Uncomment to change default font #rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) -rc('font', **{'family': 'serif', 'serif': ['Computer Modern', 'CMU Serif', 'Times New Roman']}) +rc('font', **{'family': 'serif', 'serif': ['Computer Modern', 'CMU Serif', 'Times New Roman', 'DejaVu Serif']}) # To use proper font for, e.g., Gamma if usetex is set to False rc('mathtext', fontset='cm') @@ -1665,7 +1665,7 @@ def _prepare_json(self, main_file_name="", comments=True): from matplotlib import rc # Uncomment to change default font #rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) -rc('font', **{'family': 'serif', 'serif': ['Computer Modern', 'CMU Serif', 'Times New Roman']}) +rc('font', **{'family': 'serif', 'serif': ['Computer Modern', 'CMU Serif', 'Times New Roman', 'DejaVu Serif']}) # To use proper font for, e.g., Gamma if usetex is set to False rc('mathtext', fontset='cm')