diff --git a/las_outputs.py b/las_outputs.py index bf541d3..1f3632c 100644 --- a/las_outputs.py +++ b/las_outputs.py @@ -35,7 +35,7 @@ def remove_temp_files(directory): return None -def plot_profiles(profile_name, survey_date, csv_output_dir, graph_loc, ch_limits): +def plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits): csv_name = profile_name + '.csv' profiles = pd.read_csv(os.path.join(csv_output_dir, csv_name)) @@ -48,7 +48,7 @@ def plot_profiles(profile_name, survey_date, csv_output_dir, graph_loc, ch_limit ax = plt.axes() for col in profiles.columns: profile = profiles.loc[ch_min:, col] - date_str = str(survey_date) + date_str = col.split('_')[-1] date = '{}-{}-{}'.format(date_str[:4], date_str[4:6], date_str[6:]) ax.plot(profile.index, profile, label=date) @@ -191,7 +191,7 @@ def main(): print('Updating figures...') profile_names = df['Profile'].unique() for profile_name in profile_names: - plot_profiles(profile_name, survey_date, csv_output_dir, graph_loc, ch_limits) + plot_profiles(profile_name, csv_output_dir, graph_loc, ch_limits) calculate_volumes(profile_name, survey_date, csv_output_dir, ch_limits, volume_output_dir) # Remove temprary files