- Timestamp:
- 03/20/15 17:01:25 (10 years ago)
- Location:
- TOOLS/ConsoGENCMIP6/bin
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TOOLS/ConsoGENCMIP6/bin/plot_bilan.py
r2437 r2443 213 213 linewidth=1, markersize=8, 214 214 solid_capstyle="round", solid_joinstyle="round", 215 label="conso 215 label="conso\nthéorique (%)") 216 216 ax_theo.plot(xcoord, real_uses, line_style, color="forestgreen", 217 217 linewidth=1, markersize=8, 218 218 solid_capstyle="round", solid_joinstyle="round", 219 label="conso 219 label="conso\nréelle (%)") 220 220 221 221 … … 227 227 # ------------------- 228 228 # 1) Range 229 conso_max = np.nanmax(consos) 229 230 if args.max: 230 ymax = gencmip6.alloc231 ymax = np.nanmax(consos) # + np.nanmax(consos)*.1 231 232 else: 232 ymax = np.nanmax(consos) + np.nanmax(consos)*.1 233 ymax = 2. * conso_per_day 234 235 if conso_max > ymax: 236 ax_conso.annotate( 237 "{:.2e} heures".format(conso_max), 238 ha="left", 239 va="top", 240 fontsize="xx-small", 241 bbox=dict(boxstyle="round", fc="w", ec="0.5", color="gray",), 242 xy=(np.nanargmax(consos)+1.2, ymax), 243 textcoords="axes fraction", 244 xytext=(0.01, 0.9), 245 arrowprops=dict( 246 arrowstyle="->", 247 shrinkA=0, 248 shrinkB=0, 249 color="gray", 250 ), 251 ) 233 252 234 253 xmin, xmax = xcoord[0]-1, xcoord[-1]+1 … … 260 279 ax_conso.set_yticks(yticks) 261 280 281 ax_theo.spines["right"].set_color("indianred") 282 ax_theo.tick_params(colors="indianred") 283 ax_theo.yaxis.label.set_color("indianred") 284 262 285 ax_conso.axhline(y=conso_per_day, color="blue", alpha=0.5, 263 label="conso journaliÚre 286 label="conso journaliÚre\nidéale (heures)") 264 287 265 288 for x, d in zip(xcoord, dates):
Note: See TracChangeset
for help on using the changeset viewer.