Skip to content

Commit

Permalink
Remove warning about matplotlib fonts in BandsData.show_mpl() (#2902)
Browse files Browse the repository at this point in the history
Add DejaVu font as alternative, which is available by default on Ubuntu.
  • Loading branch information
borellim authored and ltalirz committed Jun 1, 2019
1 parent 24b869b commit 9abc39d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiida/orm/nodes/data/array/bands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down

0 comments on commit 9abc39d

Please sign in to comment.