From 0d4a2b13721bb26dddda3906c65baf8951c6b894 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Wed, 25 Jul 2018 10:52:19 +1000 Subject: [PATCH] Show landward limit in figures --- las_outputs.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/las_outputs.py b/las_outputs.py index aaff5b6..8a04f7e 100644 --- a/las_outputs.py +++ b/las_outputs.py @@ -90,16 +90,19 @@ def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits, delta_vol, fig, ax = plt.subplots(figsize=(fig_w, fig_h)) ax.set_aspect(vertical_exag) else: - fig, ax = plt.subplots(figsize=(10, 6)) + fig, ax = plt.subplots(figsize=(10, 5)) for col in profiles.columns: - profile = profiles.loc[ch_min:, col] + profile = profiles.loc[:, col] date_str = col.split('_')[-1] date = get_datestring(date_str) ax.plot(profile.index, profile, label=date) + # Show landward limit of volume calculations + ax.axvline(x=ch_min, color='#222222', linestyle='--', label='Landward limit') + ax.set_title(profile_name) ax.set_xlabel('Chainage (m)', labelpad=10) ax.set_ylabel('Elevation (m AHD)', labelpad=10) @@ -109,7 +112,7 @@ def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits, delta_vol, (0.05, 0.15), xycoords='axes fraction', fontsize=9, backgroundcolor='#ffffff', linespacing=1.5) - ax.legend(edgecolor='none', facecolor='#ffffff', fontsize=9) + ax.legend(edgecolor='none', facecolor='#ffffff', fontsize=9, labelspacing=1) ax.xaxis.set_minor_locator(MultipleLocator(5)) ax.yaxis.set_minor_locator(MultipleLocator(0.5))