|
60 | 60 | # Figures
|
61 | 61 | fig, ax = plt.subplots(nrows=2, sharex=True, figsize=(3.4, 2.8))
|
62 | 62 | fig_eig, ax_eig = plt.subplots(nrows=2, sharex=True, figsize=(3.4, 2.8))
|
63 |
| -fig.subplots_adjust(left=0.11, bottom=0.12, right=0.97, top=0.97, hspace=0.06) |
64 |
| -fig_eig.subplots_adjust(left=0.11, bottom=0.12, right=0.97, top=0.97, hspace=0.06) |
| 63 | +fig.subplots_adjust(left=0.12, bottom=0.12, right=0.97, top=0.97, hspace=0.06) |
| 64 | +fig_eig.subplots_adjust(left=0.12, bottom=0.12, right=0.97, top=0.97, hspace=0.06) |
65 | 65 |
|
66 | 66 | # Loop over kx
|
67 | 67 | for i, k1 in enumerate(ks):
|
|
78 | 78 | acoustic = (np.abs(ω) > ω_upper[i])
|
79 | 79 |
|
80 | 80 | # Plot frequencies
|
81 |
| - ax[0].plot(k[acoustic], np.abs(ω[acoustic]), color=c_acoustic, **freq_props) |
82 |
| - ax[0].plot(k[f_mode], np.abs(ω[f_mode]), color=c_f_mode, **freq_props) |
83 |
| - ax[0].plot(k[gwaves], np.abs(ω[gwaves]), color=c_gravity, **freq_props) |
84 | 81 | if i == 0:
|
| 82 | + ax[0].plot(k[acoustic], np.abs(ω[acoustic]), color=c_acoustic, label='ac', **freq_props) |
| 83 | + ax[0].plot(k[f_mode], np.abs(ω[f_mode]), color=c_f_mode, label='f', **freq_props) |
| 84 | + ax[0].plot(k[gwaves], np.abs(ω[gwaves]), color=c_gravity, label='ac', **freq_props) |
85 | 85 | ax[1].plot(k[gwaves], np.abs(1/ω[gwaves]), color=c_gravity, label='gw', **freq_props)
|
86 | 86 | ax[1].plot(k[f_mode], np.abs(1/ω[f_mode]), color=c_f_mode, label='f', **freq_props)
|
87 | 87 | ax[1].plot(k[acoustic], np.abs(1/ω[acoustic]), color=c_acoustic, label='ac', **freq_props)
|
88 | 88 | else:
|
| 89 | + ax[0].plot(k[acoustic], np.abs(ω[acoustic]), color=c_acoustic, **freq_props) |
| 90 | + ax[0].plot(k[f_mode], np.abs(ω[f_mode]), color=c_f_mode, **freq_props) |
| 91 | + ax[0].plot(k[gwaves], np.abs(ω[gwaves]), color=c_gravity, **freq_props) |
89 | 92 | ax[1].plot(k[acoustic], np.abs(1/ω[acoustic]), color=c_acoustic,**freq_props)
|
90 | 93 | ax[1].plot(k[f_mode], np.abs(1/ω[f_mode]), color=c_f_mode, **freq_props)
|
91 | 94 | ax[1].plot(k[gwaves], np.abs(1/ω[gwaves]), color=c_gravity, **freq_props)
|
|
104 | 107 | # Mode properties
|
105 | 108 | colors = ['C1', 'C2', 'C4', 'C5']
|
106 | 109 | marker = 'o'
|
107 |
| - msc = 4 |
| 110 | + msc = 6 |
108 | 111 | mec = "none"
|
109 | 112 | print(" ω/N, N/ω")
|
110 | 113 | mode_props = dict(marker=marker, mec=mec, markersize=msc, alpha=0.5, zorder=3)
|
|
126 | 129 |
|
127 | 130 | # Frequency lines
|
128 | 131 | line_props = {'ls': 'solid', 'lw': 1, 'alpha': 0.5, 'zorder': 1}
|
129 |
| -ax[0].plot(ks, ω_lower, color=c_gravity, **line_props) |
130 |
| -ax[0].plot(ks, ω_upper, color=c_acoustic, **line_props) |
| 132 | +ax[0].plot(ks, ω_lower, color=c_gravity, label=r'$\omega_-$', **line_props) |
| 133 | +ax[0].plot(ks, ω_upper, color=c_acoustic, label=r'$\omega_+$', **line_props) |
131 | 134 | #ax[0].axhline(y=1, color='black', **line_props)
|
132 | 135 | ax[1].plot(ks, 1/ω_lower, color=c_gravity, label=r'$\omega_-$', **line_props)
|
133 | 136 | #ax[1].axhline(y=1, color='black', label=r'$N$', **line_props)
|
|
150 | 153 |
|
151 | 154 | ax_eig[0].set_ylabel(r'$\sqrt{\rho}w$')
|
152 | 155 | ax_eig[1].set_ylabel(r'$\sqrt{\rho}w$')
|
153 |
| -ax_eig[1].text(0, 0.65, 'gravity waves\n'+r'($\omega \leq \omega_-$)', verticalalignment='center', multialignment='center', fontsize=8) |
154 |
| -ax_eig[0].text(0, 0.65, 'acoustic waves\n'+r'($\omega > \omega_+$)', verticalalignment='center', multialignment='center', fontsize=8) |
| 156 | +ax_eig[1].text(0, 0.65, 'gravity waves\n'+r'($\omega \leq \omega_-$)', verticalalignment='center', multialignment='center', fontsize=9) |
| 157 | +ax_eig[0].text(0, 0.65, 'acoustic waves\n'+r'($\omega > \omega_+$)', verticalalignment='center', multialignment='center', fontsize=9) |
155 | 158 | ax_eig[1].set_xlabel(r'height $z$')
|
156 | 159 | ax_eig[0].set_ylim(-1.3, 1.3)
|
157 | 160 | ax_eig[1].set_ylim(-1.3, 1.3)
|
|
160 | 163 | ax_eig[1].yaxis.set_label_coords(-0.06, 0.5)
|
161 | 164 |
|
162 | 165 | # Legends
|
163 |
| -legend = ax[1].legend(ncol=2, frameon=False, fontsize=6) |
| 166 | +legend = ax[1].legend(ncol=2, loc='upper left', frameon=False, fontsize=7, handlelength=1.5) |
164 | 167 | legend.get_frame().set_linewidth(0.0)
|
165 | 168 |
|
166 |
| -legend = ax_eig[1].legend(frameon=False, title=r'period $N/\omega$', loc='lower left', ncol=2, fontsize=6) |
167 |
| -plt.setp(legend.get_title(),fontsize=8) |
| 169 | +legend = ax_eig[1].legend(frameon=False, title=r'period $N/\omega$', loc='lower left', ncol=2, fontsize=7) |
| 170 | +plt.setp(legend.get_title(),fontsize=9) |
168 | 171 | for line,text in zip(legend.get_lines(), legend.get_texts()):
|
169 | 172 | text.set_color(line.get_color())
|
170 |
| -legend = ax_eig[0].legend(frameon=False, title=r'frequency $\omega/N$', loc='lower left', ncol=2, fontsize=6) |
171 |
| -plt.setp(legend.get_title(),fontsize=8) |
| 173 | +legend = ax_eig[0].legend(frameon=False, title=r'frequency $\omega/N$', loc='lower left', ncol=2, fontsize=7) |
| 174 | +plt.setp(legend.get_title(),fontsize=9) |
172 | 175 | for line,text in zip(legend.get_lines(), legend.get_texts()):
|
173 | 176 | text.set_color(line.get_color())
|
174 | 177 |
|
175 | 178 | # Save
|
176 |
| -ax[0].text(-0.06, 1.0, "(a)", transform=ax[0].transAxes, fontsize=8, va='top', ha='right') |
177 |
| -ax[1].text(-0.06, 1.0, "(b)", transform=ax[1].transAxes, fontsize=8, va='top', ha='right') |
178 |
| -ax_eig[0].text(-0.06, 1.0, "(a)", transform=ax_eig[0].transAxes, fontsize=8, va='top', ha='right') |
179 |
| -ax_eig[1].text(-0.06, 1.0, "(b)", transform=ax_eig[1].transAxes, fontsize=8, va='top', ha='right') |
| 179 | +ax[0].text(-0.06, 1.0, "(a)", transform=ax[0].transAxes, fontsize=9, va='top', ha='right') |
| 180 | +ax[1].text(-0.06, 1.0, "(b)", transform=ax[1].transAxes, fontsize=9, va='top', ha='right') |
| 181 | +ax_eig[0].text(-0.06, 1.0, "(a)", transform=ax_eig[0].transAxes, fontsize=9, va='top', ha='right') |
| 182 | +ax_eig[1].text(-0.06, 1.0, "(b)", transform=ax_eig[1].transAxes, fontsize=9, va='top', ha='right') |
180 | 183 |
|
181 | 184 | fig.savefig('fig_waves_spectrum.pdf')
|
182 | 185 | fig_eig.savefig('fig_waves_eigenfunctions.pdf')
|
0 commit comments