Changeset 2425 for TOOLS/ConsoGENCMIP6/bin/plot_store.py
- Timestamp:
- 03/02/15 15:50:26 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/plot_store.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 … … 194 194 default="IPSLCM6", 195 195 help="plot the whole period") 196 parser.add_argument("-s", "--show", action="store_true", 197 help="interactive mode") 198 parser.add_argument("-d", "--dods", action="store_true", 199 help="copy output on dods") 196 200 197 201 return parser.parse_args() … … 209 213 print(args) 210 214 215 # ... Turn interactive mode off ... 216 # --------------------------------- 217 if not args.show: 218 import matplotlib 219 matplotlib.use('Agg') 220 221 import matplotlib.pyplot as plt 222 from matplotlib.backends.backend_pdf import PdfPages 223 224 if not args.show: 225 plt.ioff() 226 211 227 # ... Files and directories ... 212 228 # ----------------------------- 213 file_param = get_last_file(DIR[" DATA"], OUT["PARAM"])214 file_utheo = get_last_file(DIR[" DATA"], OUT["UTHEO"])215 file_store = get_last_file(DIR[" DATA"], OUT["STORE"])229 file_param = get_last_file(DIR["SAVE"], OUT["PARAM"]) 230 file_utheo = get_last_file(DIR["SAVE"], OUT["UTHEO"]) 231 file_store = get_last_file(DIR["SAVE"], OUT["STORE"]) 216 232 img_name = "bilan.pdf" 217 233 … … 287 303 plot_save(os.path.join(DIR["PLOT"], img_name)) 288 304 289 plt.show() 305 # ... Publish figure on dods ... 306 # ------------------------------ 307 if args.dods: 308 dods_cp(os.path.join(DIR["PLOT"], img_name)) 309 310 if args.show: 311 plt.show() 312 290 313 exit()
Note: See TracChangeset
for help on using the changeset viewer.