-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathED_figure7.py
executable file
·68 lines (51 loc) · 2.13 KB
/
ED_figure7.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env python3
"""
Author: Victoria McDonald
email: [email protected]
website: http://torimcd.github.com
license: BSD
"""
import matplotlib
matplotlib.use("Agg")
import numpy
import matplotlib
import matplotlib.pyplot as plt
# ------------------------------------------------------------------------
# This script plots a table of CO2 and S/So values run in each model
# ------------------------------------------------------------------------
table_values = ['_________________________________________________',
' ',
r'$\mathit{S/S_0}$' + ' ' + r'$\mathrm{CAM4}$' + ' ' + r'$\mathrm{CO_2}$' + ' ' + r'$\mathrm{(ppmv)}$' + ' '+ r'$\mathrm{CAM5}$' + ' ' + r'$\mathrm{CO_2}$' + ' ' + r'$\mathrm{(ppmv)}$',
'_________________________________________________',
'0.700 130,000 ',
'0.725 92,000 ',
'0.750 65,500 ',
'0.775 45,119 ',
'0.800 31,688 ',
'0.825 20,809 ',
'0.850 13,562 ',
'0.875 8,692 ',
'0.900 5,254 6,000',
'0.925 3,108 2,700',
'0.950 1,616 1,400',
'0.975 813 700',
'1.000 368.9 284.7',
'1.025 139.2 120',
'1.050 51.4 35',
'1.075 15.1 ',
'1.100 4.5 ',
'_________________________________________________']
#create plot
fig = plt.figure(figsize=(3.46457, 4))
space = 0
for row in table_values:
if row == table_values[3] or row == table_values[2]:
fs = 7
space = space - 0.01
else:
fs = 7
plt.text(0, 1-space, row, fontsize=fs)
space = space + 0.05
plt.axis('off')
plt.show()
fig.savefig("figures_ED/ED_figure7.pdf", format='pdf', bbox_inches='tight')