- Timestamp:
- 03/26/15 11:30:01 (10 years ago)
- Location:
- TOOLS/ConsoGENCMIP6/bin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
r2445 r2448 279 279 ax_conso.set_yticks(yticks) 280 280 281 ax_theo.spines["right"].set_color(" indianred")282 ax_theo.tick_params(colors=" indianred")283 ax_theo.yaxis.label.set_color(" indianred")281 ax_theo.spines["right"].set_color("firebrick") 282 ax_theo.tick_params(colors="firebrick") 283 ax_theo.yaxis.label.set_color("firebrick") 284 284 285 285 ax_conso.axhline(y=conso_per_day, color="blue", alpha=0.5, -
TOOLS/ConsoGENCMIP6/bin/plot_bilan_jobs.py
r2437 r2448 219 219 linewidth=1, markersize=8, 220 220 solid_capstyle="round", solid_joinstyle="round", 221 label="conso 221 label="conso\nthéorique (%)") 222 222 ax_theo.plot(xcoord, real_uses, line_style, color="forestgreen", 223 223 linewidth=1, markersize=8, 224 224 solid_capstyle="round", solid_joinstyle="round", 225 label="conso 225 label="conso\nréelle (%)") 226 226 227 227 line_width = 0. … … 234 234 ax_jobs.bar(xcoord, pen_mean, bottom=run_mean, width=width, align="center", 235 235 # yerr=pen_std/2, ecolor="darkred", 236 color=" indianred", linewidth=line_width, antialiased=True,236 color="firebrick", linewidth=line_width, antialiased=True, 237 237 label="jobs pending") 238 238 … … 245 245 # ------------------- 246 246 # 1) Range 247 # if args.max: 248 # ymax = gencmip6.alloc 249 # else: 250 # ymax = np.nanmax(consos) + np.nanmax(consos)*.1 247 conso_max = np.nanmax(consos) 248 if args.max: 249 ymax = conso_max # + conso_max*.1 250 else: 251 ymax = 2. * conso_per_day 252 253 if conso_max > ymax: 254 ax_conso.annotate( 255 "{:.2e} heures".format(conso_max), 256 ha="left", 257 va="top", 258 fontsize="xx-small", 259 bbox=dict(boxstyle="round", fc="w", ec="0.5", color="gray",), 260 xy=(np.nanargmax(consos)+1.2, ymax*0.9), 261 textcoords="axes fraction", 262 xytext=(0.01, 0.8), 263 arrowprops=dict( 264 arrowstyle="->", 265 shrinkA=0, 266 shrinkB=0, 267 color="gray", 268 ), 269 ) 251 270 252 271 xmin, xmax = xcoord[0]-1, xcoord[-1]+1 253 272 ax_conso.set_xlim(xmin, xmax) 254 #ax_conso.set_ylim(0., ymax)273 ax_conso.set_ylim(0., ymax) 255 274 ax_theo.set_ylim(0., 100) 256 275 … … 283 302 ax.axhline(y=y, color="blue", alpha=0.5, 284 303 label="conso journaliÚre\nidéale ({})".format(label)) 304 305 ax_theo.spines["right"].set_color("firebrick") 306 ax_theo.tick_params(colors="firebrick") 307 ax_theo.yaxis.label.set_color("firebrick") 285 308 286 309 for x, d in zip(xcoord, dates): … … 458 481 # ... Tweak figure ... 459 482 # -------------------- 460 title = "Consommation {}\n({:%d/%m/%Y} - {:%d/%m/%Y})".format( 461 gencmip6.project.upper(), 462 gencmip6.date_init, 463 gencmip6.deadline 464 ) 483 title = "{} : Conso globale et suivi des jobs " \ 484 "(moyenne journaliÚre)\n({:%d/%m/%Y} - {:%d/%m/%Y})".format( 485 gencmip6.project.upper(), 486 gencmip6.date_init, 487 gencmip6.deadline 488 ) 465 489 466 490 plot_config(fig, ax_conso, ax_theo, xcoord, dates, title, conso_per_day) -
TOOLS/ConsoGENCMIP6/bin/plot_jobs.py
r2440 r2448 197 197 ax.bar(xcoord, pen_jobs, bottom=run_jobs, width=width, 198 198 linewidth=line_width, align="center", 199 color=" indianred", antialiased=True,199 color="firebrick", antialiased=True, 200 200 label="jobs pending") 201 201
Note: See TracChangeset
for help on using the changeset viewer.