Last active
February 26, 2018 13:29
-
-
Save Vindaar/9c2eac7447c3df79d6421e6680d34fdd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylab | |
# taken from some random webpage several years ago. Sorry author :( | |
def fancy_plotting(): | |
# set up some LaTeX plotting parameters | |
# still need to change parameters | |
# next line is for standard article document | |
# fig_width_pt = 478.00812#246.0 # Get this from LaTeX using \showthe\columnwidth | |
# next line is for thesis after Brock thesis guide | |
fig_width_pt = 451.58598 | |
inches_per_pt = 1.0/72.27 # Convert pt to inch | |
golden_mean = (np.sqrt(5)-1.0)/2.0 # Aesthetic ratio | |
fig_width = 1.3*fig_width_pt*inches_per_pt # width in inches | |
fig_height = 1.3*fig_width*golden_mean # height in inches | |
fig_size = [fig_width,fig_height] | |
params = {'backend': 'ps', | |
'axes.labelsize': 10,#10, | |
'axes.titlesize': 10, | |
'font.size': 10, | |
'legend.fontsize': 8,#10, | |
'xtick.labelsize': 8,#8, | |
'ytick.labelsize': 8,#8, | |
'text.usetex': True, | |
'text.latex.preamble': [r'\usepackage{siunitx} \usepackage{mhchem}'], | |
'font.family': 'serif', | |
'font.serif': 'cm', | |
'figure.figsize': fig_size} | |
pylab.rcParams.update(params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment