-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_original.pro
More file actions
94 lines (54 loc) · 2.37 KB
/
plot_original.pro
File metadata and controls
94 lines (54 loc) · 2.37 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@read_re_abundances
@legend
PRO SP_IDX, spe, sp, nspe
n_spe = n_elements(spe)
nspe = 0
FOR i = 0, n_spe - 1 DO IF (strcompress(spe(i), /remove_all) EQ sp) THEN nspe = i
END
data_path = "/home/cns/Documents/Dropbox/idlfiles/results.idl"
fig_path = "~/Desktop/"
set_plot, 'PS'
!p.multi = [2,2,1,0,0]
device, file = fig_path+'fig.ps', /inches, bits = 32, /color, /landscape, xsize=10, ysize=5
sp2plot = ['CO', 'CO2', 'HCN', 'CH3OH', 'H2O', 'CH4']
sp2plot_print = ['CO', 'CO2', 'HCN', 'CH3OH', 'H2O', 'CH4']
linestyles = intarr(n_elements(sp2plot))
n_sp = intarr(n_elements(sp2plot))
read_re_abundances, data_path, species, ns, t_re, nstep_re, ab_re, hdens, rr, zz
t_re = t_re/3.155e7
FOR i = 0, n_elements(sp2plot)-1 DO BEGIN
sp_idx, species, sp2plot(i), n_spt
n_sp(i) = n_spt
ENDFOR
plot, t_re, ab_re(0:nstep_re-1,n_sp(0)), /xlog, /ylog, xrange = [1d4, 1.d6], yrange = [1d-14, 1d-3], linestyle = 0, charsize = 1, xtitle="t, years", ytitle="n(X)/n!DH!N", xstyle=1
linestyles(0) = 0
for i = 1, n_elements(n_sp)-1 do begin
oplot, t_re, ab_re(0:nstep_re-1,n_sp(i)), linestyle = i
linestyles(i) = i
endfor
legend, sp2plot_print, linestyle = linestyles, position = [0.1,0.9], /normal
plot, t_re, ab_re(0:nstep_re-1,n_sp(0)), /ylog, xrange = [1d6, 1.2d6], yrange = [1d-14, 1d-3], linestyle = 0, charsize = 1, xtitle="t, years", ytitle="n(X)/n!DH!N", xstyle=1
linestyles(0) = 0
for i = 1, n_elements(n_sp)-1 do begin
oplot, t_re, ab_re(0:nstep_re-1,n_sp(i)), linestyle = i
linestyles(i) = i
endfor
device, /close
set_plot, 'X'
plot, t_re, ab_re(0:nstep_re-1,n_sp(0)), /xlog, /ylog, xrange = [1d4, 1.d6], yrange = [1d-14, 1d-3], $
linestyle = 0, charsize = 1.5, xtitle="t, years", ytitle="n(X)/n!DH!N", xstyle=1
linestyles(0) = 0
for i = 1, n_elements(n_sp)-1 do begin
oplot, t_re, ab_re(0:nstep_re-1,n_sp(i)), linestyle = i
linestyles(i) = i
endfor
legend, sp2plot_print, linestyle = linestyles, position = [0.18,0.92], /normal
plot, t_re, ab_re(0:nstep_re-1,n_sp(0)), /ylog, xrange = [1d6, 1.2d6], yrange = [1d-14, 1d-3], linestyle = 0, charsize = 1.5, xtitle="t, years", ytitle="n(X)/n!DH!N", xstyle=1
linestyles(0) = 0
for i = 1, n_elements(n_sp)-1 do begin
oplot, t_re, ab_re(0:nstep_re-1,n_sp(i)), linestyle = i
linestyles(i) = i
endfor
close, /all
print, 'Done.'
END