Created
October 9, 2019 11:15
-
-
Save danhey/56c3737c0e4c14fee768c83e09f3f745 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
def mnras_size(fig_width_pt, square=False): | |
inches_per_pt = 1.0/72.00 # Convert pt to inches | |
golden_mean = (np.sqrt(5)-1.0)/2.0 # Most aesthetic ratio | |
fig_width = fig_width_pt*inches_per_pt # Figure width in inches | |
if square: | |
fig_height = fig_width | |
else: | |
fig_height = fig_width*golden_mean | |
return [fig_width,fig_height] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment