Repository: climate Updated Branches: refs/heads/master 511a9cae4 -> 1aa5a98e2
CLIMATE-703 - Remove pop-up windows from metrics_and_plots.py - plt.show() has been removed - The license head has been added Project: http://git-wip-us.apache.org/repos/asf/climate/repo Commit: http://git-wip-us.apache.org/repos/asf/climate/commit/36ea1afd Tree: http://git-wip-us.apache.org/repos/asf/climate/tree/36ea1afd Diff: http://git-wip-us.apache.org/repos/asf/climate/diff/36ea1afd Branch: refs/heads/master Commit: 36ea1afd282ef53d0c0693b19316077006822e43 Parents: 511a9ca Author: huikyole <[email protected]> Authored: Tue Nov 10 10:27:34 2015 -0800 Committer: huikyole <[email protected]> Committed: Tue Nov 10 10:27:34 2015 -0800 ---------------------------------------------------------------------- .../metrics_and_plots.py | 20 +++++++++++++++++--- .../configuration_file_examples/run_RCMES.py | 17 +++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/climate/blob/36ea1afd/examples/configuration_file_examples/metrics_and_plots.py ---------------------------------------------------------------------- diff --git a/examples/configuration_file_examples/metrics_and_plots.py b/examples/configuration_file_examples/metrics_and_plots.py index 41e0d14..ac32c85 100644 --- a/examples/configuration_file_examples/metrics_and_plots.py +++ b/examples/configuration_file_examples/metrics_and_plots.py @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + #Apache OCW lib immports import ocw.data_source.local as local import ocw.plotter as plotter @@ -79,7 +96,6 @@ def Map_plot_bias_of_multiyear_climatology(obs_dataset, obs_name, model_datasets plt.subplots_adjust(hspace=0.01,wspace=0.05) - plt.show() fig.savefig(file_name,dpi=600,bbox_inches='tight') def Taylor_diagram_spatial_pattern_of_multiyear_climatology(obs_dataset, obs_name, model_datasets, model_names, @@ -144,7 +160,6 @@ def Time_series_subregion(obs_subregion_mean, obs_name, model_subregion_mean, mo ax.legend(bbox_to_anchor=(-0.2, row/2), loc='center' , prop={'size':7}, frameon=False) fig.subplots_adjust(hspace=0.7, wspace=0.5) - plt.show() fig.savefig(file_name, dpi=600, bbox_inches='tight') def Portrait_diagram_subregion(obs_subregion_mean, obs_name, model_subregion_mean, model_names, seasonal_cycle, @@ -201,7 +216,6 @@ def Map_plot_subregion(subregions, ref_dataset, directory): for subregion in subregions: draw_screen_poly(subregion[1], m, 'w') plt.annotate(subregion[0],xy=(0.5*(subregion[1][2]+subregion[1][3]), 0.5*(subregion[1][0]+subregion[1][1])), ha='center',va='center', fontsize=8) - plt.show() fig.savefig(directory+'map_subregion', bbox_inches='tight') def draw_screen_poly(boundary_array, m, linecolor='k'): http://git-wip-us.apache.org/repos/asf/climate/blob/36ea1afd/examples/configuration_file_examples/run_RCMES.py ---------------------------------------------------------------------- diff --git a/examples/configuration_file_examples/run_RCMES.py b/examples/configuration_file_examples/run_RCMES.py index fd55be3..99a06bb 100644 --- a/examples/configuration_file_examples/run_RCMES.py +++ b/examples/configuration_file_examples/run_RCMES.py @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + #Apache OCW lib immports import ocw.dataset_processor as dsp import ocw.data_source.local as local
