In [ ]:
# Setting a nice figure ratio
WIDTH = 14*72.27 # Figure width in pt (usually from LaTeX)
FACTOR = 1 # Fraction of the width you'd like the figure to occupy
widthpt = WIDTH * FACTOR
inperpt = 1.0 / 72.27
golden_ratio = (np.sqrt(5) - 1.0) / 2.0 # because it looks good
widthin = widthpt * inperpt
heightin = widthin * golden_ratio
figdims = [widthin, heightin] # Dimensions as list
print figdims