Changeset 2434


Ignore:
Timestamp:
03/05/15 12:52:00 (9 years ago)
Author:
labetoulle
Message:

Print value of ideal daily consumption on axis

Location:
TOOLS/ConsoGENCMIP6/bin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/ConsoGENCMIP6/bin/plot_bilan.py

    r2433 r2434  
    197197 
    198198######################################## 
    199 def plot_config(ax_conso, ax_theo, xcoord, xlabels, ymax, title): 
     199def plot_config(ax_conso, ax_theo, xcoord, xlabels, ymax, title, conso_per_day): 
    200200  """ 
    201201  """ 
     
    216216    xlabels[::inc_label], rotation="45", size="x-small" 
    217217  ) 
     218 
     219  yticks = list(ax_conso.get_yticks()) 
     220  yticks.append(conso_per_day) 
     221  ax_conso.set_yticks(yticks) 
    218222 
    219223  # 3) Define axes title 
     
    394398  ) 
    395399 
    396   plot_config(ax_conso, ax_theo, xcoord, xlabels, ymax, title) 
     400  plot_config(ax_conso, ax_theo, xcoord, xlabels, ymax, title, conso_per_day) 
    397401 
    398402  # ... Save figure ... 
  • TOOLS/ConsoGENCMIP6/bin/plot_jobs.py

    r2433 r2434  
    181181 
    182182######################################## 
    183 def plot_config(ax, xcoord, xlabels, title): 
     183def plot_config(ax, xcoord, xlabels, title, conso_per_day): 
    184184  """ 
    185185  """ 
     
    201201  ax.set_xticks(xcoord_maj, minor=False) 
    202202  ax.set_xticklabels(xlabels_maj, rotation="vertical", size="x-small") 
     203 
     204  yticks = list(ax.get_yticks()) 
     205  yticks.append(conso_per_day) 
     206  ax.set_yticks(yticks) 
    203207 
    204208  # 3) Define axes title 
     
    376380  ) 
    377381 
    378   plot_config(ax, xcoord, xlabels, title) 
     382  plot_config(ax, xcoord, xlabels, title, conso_per_day) 
    379383 
    380384  # ... Save figure ... 
Note: See TracChangeset for help on using the changeset viewer.