diff --git a/docs/appendix/yaml.rst b/docs/appendix/yaml.rst index 5f1f3030..3a4fbc08 100644 --- a/docs/appendix/yaml.rst +++ b/docs/appendix/yaml.rst @@ -75,6 +75,9 @@ regarding the directory files are read from. * **method:** The file format to read from. Options are 'netcdf' and 'pkl'. * **filenames:** The filename(s) that should be read in. For method: 'netcdf' this must be set as a dict in the form filenames: {'group1':str or iterable of filename(s) in group1, group2: str or iterable of filename(s) in group2,...}. For method: 'pkl' this must be set as either a string with the filename or as an or iterable of filenames. Wildcards will be expanded to any matching files. +**add_logo:** This is an optional argument. +Set this to ``false`` to forgo adding the MELODIES MONET logo to the plots. + Models ------ All input for each instance of the model class. First level should be the model diff --git a/melodies_monet/driver.py b/melodies_monet/driver.py index a3478204..03c92baa 100644 --- a/melodies_monet/driver.py +++ b/melodies_monet/driver.py @@ -738,6 +738,8 @@ def __init__(self): self.obs_gridded_data = {} self.obs_gridded_count = {} self.obs_gridded_dataset = None + self.add_logo = True + """bool, default=True : Add the MELODIES MONET logo to the plots.""" def __repr__(self): return ( @@ -809,6 +811,8 @@ def read_control(self, control=None): self.save = self.control_dict['analysis']['save'] if 'read' in self.control_dict['analysis'].keys(): self.read = self.control_dict['analysis']['read'] + if 'add_logo' in self.control_dict['analysis'].keys(): + self.add_logo = self.control_dict['analysis']['add_logo'] # set time_chunking_with_gridded_data option, regrid option, and target_grid if 'time_chunking_with_gridded_data' in self.control_dict['analysis'].keys(): @@ -1498,6 +1502,9 @@ def plotting(self): from .plots import aircraftplots as airplots from .plots import ozone_sonder_plots as sonderplots + if not self.add_logo: + savefig.keywords.update(decorate=False) + # Disable figure count warning initial_max_fig = plt.rcParams["figure.max_open_warning"] plt.rcParams["figure.max_open_warning"] = 0 diff --git a/melodies_monet/plots/satplots.py b/melodies_monet/plots/satplots.py index c2be2040..92cec927 100644 --- a/melodies_monet/plots/satplots.py +++ b/melodies_monet/plots/satplots.py @@ -524,7 +524,7 @@ def make_spatial_overlay(df, vmodel, column_o=None, label_o=None, column_m=None, cax.tick_params(labelsize=text_kwargs['fontsize']*0.8,length=10.0,width=2.0,grid_linewidth=2.0) #plt.tight_layout(pad=0) - savefig(outname + '.png',loc=4, logo_height=100, decorate=True, bbox_inches='tight', dpi=150) + savefig(outname + '.png',loc=4, logo_height=100, bbox_inches='tight', dpi=150) return ax def calculate_boxplot(df, df_reg=None,column=None, label=None, plot_dict=None, comb_bx = None, label_bx = None): @@ -671,7 +671,7 @@ def make_boxplot(comb_bx, label_bx, ylabel = None, vmin = None, vmax = None, out ax.set_ylim(ymin = vmin, ymax = vmax) plt.tight_layout() - savefig(outname + '.png',loc=4, logo_height=100, decorate=True, bbox_inches='tight', dpi=200) + savefig(outname + '.png',loc=4, logo_height=100, bbox_inches='tight', dpi=200) def make_spatial_bias_gridded(df, column_o=None, label_o=None, column_m=None, label_m=None, ylabel = None, vmin=None, @@ -777,5 +777,5 @@ def make_spatial_bias_gridded(df, column_o=None, label_o=None, column_m=None, cax.tick_params(labelsize=text_kwargs['fontsize']*0.8,length=10.0,width=2.0,grid_linewidth=2.0) #plt.tight_layout(pad=0) - savefig(outname + '.png',loc=4, logo_height=100, decorate=True, bbox_inches='tight', dpi=150) + savefig(outname + '.png',loc=4, logo_height=100, bbox_inches='tight', dpi=150) return ax