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 numpy as np | |
import matplotlib as mpl | |
mpl.use('pgf') | |
def figsize(scale): | |
fig_width_pt = 469.755 # Get this from LaTeX using \the\textwidth | |
inches_per_pt = 1.0/72.27 # Convert pt to inch | |
golden_mean = (np.sqrt(5.0)-1.0)/2.0 # Aesthetic ratio (you could change this) | |
fig_width = fig_width_pt*inches_per_pt*scale # width in inches | |
fig_height = fig_width*golden_mean # height in inches |