MCPcopy Create free account
hub / github.com/Wookai/paper-tips-and-tricks / figure_setup

Function figure_setup

src/python/plot_utils.py:56–74  ·  view source on GitHub ↗

Set all the sizes to the correct values and use tex fonts for all texts.

()

Source from the content-addressed store, hash-verified

54
55
56def figure_setup():
57 """Set all the sizes to the correct values and use
58 tex fonts for all texts.
59 """
60 params = {'text.usetex': True,
61 'figure.dpi': 200,
62 'font.size': font_size(),
63 'font.serif': [],
64 'font.sans-serif': [],
65 'font.monospace': [],
66 'axes.labelsize': label_size(),
67 'axes.titlesize': font_size(),
68 'axes.linewidth': axis_lw(),
69 'text.fontsize': font_size(),
70 'legend.fontsize': font_size(),
71 'xtick.labelsize': ticks_size(),
72 'ytick.labelsize': ticks_size(),
73 'font.family': 'serif'}
74 plt.rcParams.update(params)
75
76
77def save_fig(fig, file_name, fmt=None, dpi=300, tight=True):

Callers

nothing calls this directly

Calls 4

font_sizeFunction · 0.85
label_sizeFunction · 0.85
axis_lwFunction · 0.85
ticks_sizeFunction · 0.85

Tested by

no test coverage detected