Changeset 2323 in lmdz_wrf


Ignore:
Timestamp:
Feb 6, 2019, 9:37:53 PM (6 years ago)
Author:
lfita
Message:

Fixing `figureMap_size'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing_tools.py

    r2321 r2323  
    30783078    return axisv, newaxist, newaxisL
    30793079
    3080 def figureMap_size(lonlatb, figwidth=8, Ncol=1, Nrow=1, dpi=100)
     3080def figureMap_size(lonlatb, figwidth=8, Ncol=1, Nrow=1, titpercen=1.1, dpi=100):
    30813081    """ Function to determine the real size of a figure adjusted to the ratio of the
    30823082      maps
     
    30863086      [Ncol]: Number of columns of panels
    30873087      [Nrow]: Number of rows of panels
     3088      [titpercen]: percentage of ewxtra space for the superior title
    30883089      [dpi]: density of pixels by inch
    30893090      * To be used as
     
    30923093    fname = 'figureMap_size'
    30933094
    3094     fwidth = zonev[3]-zonev[1]
    3095     fheight = zonev[4]-zonev[2]
     3095    fwidth = lonlatb[2]-lonlatb[0]
     3096    fheight = lonlatb[3]-lonlatb[1]
    30963097
    30973098    figwidth = 8.
    3098     figheight = figwidth*1.1*Nrow*fheight/(Ncol*fwidth)
     3099    figheight = figwidth*titpercen*Nrow*fheight/(Ncol*fwidth)
    30993100    figsizev = (figwidth, figheight)
    31003101
    31013102    # Height of a line of text as fraction of the figure height
    3102     txtlineh = 16./(figheight*fig.dpi)
     3103    txtlineh = 16./(figheight*dpi)
    31033104
    31043105    return figsizev, txtlineh
Note: See TracChangeset for help on using the changeset viewer.