Пример #1
0
for tick in ax.yaxis.get_major_ticks():
    tick.label.set_fontsize(16)

fig = plt.savefig('%s.flow.season.png' %cfg['OUTPUT']['output_plot_basename'], format='png', dpi=dpi)

#============== plot flow duration curve (based on weekly data) ===============#
s = list_s_to_plot_weekly[0]


fig = my_functions.plot_duration_curve(\
            list_s_data=list_s_to_plot_weekly_noNAN, \
            list_style=list_plot_style, \
            list_label=list_plot_label, \
            figsize=(10,10), xlog=False, ylog=True, \
            xlim=None, ylim=None, \
            xlabel='Exceedence', ylabel='Flow (thousand cfs)', \
            title='{}, WY {}-{}\n'.format(cfg['PLOT_OPTIONS']['plot_title'], \
                                        plot_start_date.year+1, \
                                        plot_end_date.year), \
            fontsize=18, legend_loc='upper right', \
            add_info_text=True, model_info=model_info, \
            stats='Flow duration curve based on weekly data', show=False)

ax = plt.gca()
for tick in ax.xaxis.get_major_ticks():
    tick.label.set_fontsize(16)
for tick in ax.yaxis.get_major_ticks():
    tick.label.set_fontsize(16)

fig = plt.savefig('%s.flow_duration_weekly.png' %cfg['OUTPUT']['output_plot_basename'], format='png', dpi=dpi)
Пример #2
0
        #-------------------------------------------
        df_to_plot = pd.DataFrame(s_TVA_to_plot.values, index=s_TVA_to_plot.index, columns=['tva'])
        df_to_plot['usgs'] = s_usgs_to_plot
        df_to_plot = df_to_plot.dropna()
        s_usgs_to_plot = df_to_plot['usgs']
        s_TVA_to_plot = df_to_plot['tva']
        #-------------------------------------------

        #=== Plot flow duration curves (daily data) ===#
        fig = my_functions.plot_duration_curve(\
            list_s_data=[s_TVA_to_plot, s_usgs_to_plot], \
            list_style=['k-', 'b-'], \
            list_label=['TVA pass-through daily', 'USGS daily'], \
            figsize=(10,10), xlog=False, ylog=True, \
            xlim=None, ylim=None, \
            xlabel='Exceedence', ylabel='Flow (thousand cfs)', \
            title='Dam {}, daily flow duration, WY {}-{}'.format(dam_number, \
                                        plot_start_date.year+1, \
                                        plot_end_date.year), \
            fontsize=18, legend_loc='upper right', \
            add_info_text=True, model_info='Compare USGS flow data with TVA pass-through', \
            stats='Flow duration curve based on daily data', show=False)

        ax = plt.gca()
        for tick in ax.xaxis.get_major_ticks():
            tick.label.set_fontsize(16)
        for tick in ax.yaxis.get_major_ticks():
            tick.label.set_fontsize(16)

        plt.savefig(os.path.join(out_plot_dir, \
                                'dam{}.flow_duration_daily.png'.format(dam_number)), \
Пример #3
0
fig = plt.savefig('%s.flow.season.png' % cfg['OUTPUT']['output_plot_basename'],
                  format='png',
                  dpi=dpi)

#============== plot flow duration curve (based on weekly data) ===============#
s = list_s_to_plot_weekly[0]


fig = my_functions.plot_duration_curve(\
            list_s_data=list_s_to_plot_weekly_noNAN, \
            list_style=list_plot_style, \
            list_label=list_plot_label, \
            figsize=(10,10), xlog=False, ylog=True, \
            xlim=None, ylim=None, \
            xlabel='Exceedence', ylabel='Flow (thousand cfs)', \
            title='{}, WY {}-{}\n'.format(cfg['PLOT_OPTIONS']['plot_title'], \
                                        plot_start_date.year+1, \
                                        plot_end_date.year), \
            fontsize=18, legend_loc='upper right', \
            add_info_text=True, model_info=model_info, \
            stats='Flow duration curve based on weekly data', show=False)

ax = plt.gca()
for tick in ax.xaxis.get_major_ticks():
    tick.label.set_fontsize(16)
for tick in ax.yaxis.get_major_ticks():
    tick.label.set_fontsize(16)

fig = plt.savefig('%s.flow_duration_weekly.png' %
                  cfg['OUTPUT']['output_plot_basename'],