-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfigstyle.py
More file actions
19 lines (19 loc) · 982 Bytes
/
Copy pathfigstyle.py
File metadata and controls
19 lines (19 loc) · 982 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""Shared Arial-metric (Arimo) figure style. Import at top of every plot script."""
import os, matplotlib as mpl
import matplotlib.font_manager as fm
# Arimo (Apache-2.0, metric-compatible with Arial) is bundled next to this file.
_FD=os.path.join(os.path.dirname(os.path.abspath(__file__)),"fonts")
for _f in ["Arimo-Regular.ttf","Arimo-Bold.ttf","Arimo-Italic.ttf","Arimo-BoldItalic.ttf"]:
p=os.path.join(_FD,_f)
if os.path.exists(p): fm.fontManager.addfont(p)
mpl.rcParams.update({
'font.family':'Arimo','font.sans-serif':['Arimo','DejaVu Sans'],
'font.size':8.5,'axes.titlesize':9.5,'axes.labelsize':8.5,
'xtick.labelsize':8.0,'ytick.labelsize':8.0,'legend.fontsize':8.0,
'mathtext.fontset':'dejavusans',
'axes.linewidth':0.7,'axes.edgecolor':'#52514e',
'pdf.fonttype':42,'ps.fonttype':42,'figure.dpi':200,'savefig.bbox':'tight',
})
INK='#0b0b0b'; INK2='#52514e'
# 180 mm double-column ~= 7.09 in; text width in this paper ~= 6.78 in.
WIDTH=6.95