granular-channel-hydro

Subglacial hydrology model for sedimentary channels
git clone git://src.adamsgaard.dk/granular-channel-hydro
Log | Files | Refs | README | LICENSE

commit 46dfffde617f0688622073bd949a6d64311f8368
parent 633970e66a0eb2d60b96eab40e8a9f891201ecf0
Author: Anders Damsgaard <andersd@riseup.net>
Date:   Fri, 18 Aug 2017 13:23:24 +0200

change axis units

Diffstat:
M1d-channel.py | 18++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/1d-channel.py b/1d-channel.py @@ -227,8 +227,8 @@ def plot_state(step, time, S_, S_max_, title=False): ax_m3s_sed_blank = plt.subplot(3, 1, 2, sharex=ax_Pa) ax_m3s_sed_blank.get_yaxis().set_visible(False) ax_m3s_sed = ax_m3s_sed_blank.twinx() - ax_m3s_sed.plot(s_c/1000., Q_s, '-', label='$Q_{s}$') - ax_m3s_sed.set_ylabel('[m$^3$/s]') + #ax_m3s_sed.plot(s_c/1000., Q_s, '-', label='$Q_{s}$') + ax_m3s_sed.plot(s_c/1000., Q_s*1000., '-', label='$Q_{s}$') ax_m3s_sed.legend(loc=2) ax_m2 = plt.subplot(3, 1, 3, sharex=ax_Pa) @@ -236,13 +236,23 @@ def plot_state(step, time, S_, S_max_, title=False): ax_m2.plot(s_c/1000., S_max_, '--', color='#666666', label='$S_{max}$') ax_m2s = ax_m2.twinx() - ax_m2s.plot(s_c/1000., dSdt, ':', label='$dS/dt$') + #ax_m2s.plot(s_c/1000., dSdt, ':', label='$dS/dt$') + ax_m2s.plot(s_c/1000., dSdt*1000., ':', label='$dS/dt$') ax_m2.legend(loc=2) ax_m2s.legend(loc=3) ax_m2.set_xlabel('$s$ [km]') ax_m2.set_ylabel('[m$^2$]') - ax_m2s.set_ylabel('[m$^2$/s]') + #ax_m3s_sed.set_ylabel('[m$^3$/s]') + #ax_m2s.set_ylabel('[m$^2$/s]') + ax_m3s_sed.set_ylabel('[mm$^3$/s]') + ax_m2s.set_ylabel('[mm$^2$/s]') + + # use scientific notation for m3s and m2s axes + #ax_m3s_sed.get_yaxis().set_major_formatter(plt.LogFormatter(10, + #labelOnlyBase=False)) + #ax_m2s.get_yaxis().set_major_formatter(plt.LogFormatter(10, + #labelOnlyBase=False)) ax_Pa.set_xlim([s.min()/1000., s.max()/1000.])