Changeset 2425 for TOOLS/ConsoGENCMIP6/bin/plot_login.py
- Timestamp:
- 03/02/15 15:50:26 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/plot_login.py
r2417 r2425 10 10 import os.path 11 11 import numpy as np 12 import matplotlib.pyplot as plt13 from matplotlib.backends.backend_pdf import PdfPages12 # import matplotlib.pyplot as plt 13 # from matplotlib.backends.backend_pdf import PdfPages 14 14 15 15 # Application library imports … … 147 147 help="plot all the logins" + 148 148 " (default: plot only non-zero)") 149 parser.add_argument("-s", "--show", action="store_true", 150 help="interactive mode") 151 parser.add_argument("-d", "--dods", action="store_true", 152 help="copy output on dods") 149 153 150 154 return parser.parse_args() … … 159 163 # ------------------------------ 160 164 args = get_arguments() 165 if args.verbose: 166 print(args) 167 168 # ... Turn interactive mode off ... 169 # --------------------------------- 170 if not args.show: 171 import matplotlib 172 matplotlib.use('Agg') 173 174 import matplotlib.pyplot as plt 175 from matplotlib.backends.backend_pdf import PdfPages 176 177 if not args.show: 178 plt.ioff() 161 179 162 180 # ... Files and directories ... 163 181 # ----------------------------- 164 file_param = get_last_file(DIR[" DATA"], OUT["PARAM"])165 file_utheo = get_last_file(DIR[" DATA"], OUT["UTHEO"])166 file_login = get_last_file(DIR[" DATA"], OUT["LOGIN"])182 file_param = get_last_file(DIR["SAVE"], OUT["PARAM"]) 183 file_utheo = get_last_file(DIR["SAVE"], OUT["UTHEO"]) 184 file_login = get_last_file(DIR["SAVE"], OUT["LOGIN"]) 167 185 img_name = "bilan.pdf" 168 186 … … 229 247 plot_save(os.path.join(DIR["PLOT"], img_name)) 230 248 231 plt.show() 249 # ... Publish figure on dods ... 250 # ------------------------------ 251 if args.dods: 252 dods_cp(os.path.join(DIR["PLOT"], img_name)) 253 254 if args.show: 255 plt.show() 256 232 257 exit()
Note: See TracChangeset
for help on using the changeset viewer.