Changeset 1418 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jan 19, 2017, 12:18:46 AM (8 years ago)
Author:
lfita
Message:

Fixing range option in `draw_vector'

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r1417 r1418  
    39073907          [color]: color of the vectors
    39083908            'singlecol'@[colorn]: all the vectors same color ('auto': for 'red')
    3909             'wind'@[colorbar]@[sminv],[smaxv]: color of the vectors according to wind speed sqrt(u^2+v^2) and given [colorbar]
     3909            'wind'@[colorbar],[sminv]|[smaxv]: color of the vectors according to wind speed sqrt(u^2+v^2) and given [colorbar]
    39103910              all vectors the same length
    39113911              [smin/axv]: minimum and maximum value for the shading or:
     
    39203920                 percentile_(100-val)-median)
    39213921 
    3922             '3rdvar'@[colorbar]@[varn]@[units]@[sminv],[smaxv]: color of the vectors according to a 3rd variable (to be added at -v) and given [colorbar]
     3922            '3rdvar'@[colorbar]@[varn]@[units],[sminv]|[smaxv]: color of the vectors according to a 3rd variable (to be added at -v) and given [colorbar]
    39233923              all vectors the same length
    39243924          [length]: length of the wind vectors ('auto', for 9)
     
    40564056        colorv = np.sqrt(uwvals**2 + vwvals**2)
    40574057        # Min/Max colorbar
    4058         shadminmax = colorvals.split('@')[2]
    4059         shading_nx = shadminmax.split(',')       
     4058        shadminmax = vecvals.split(',')[3]
     4059        shading_nx = shadminmax.split('|')
     4060        print ' Lluis shading_nx:', shading_nx
    40604061    elif coln == '3rdvar':
    40614062        if len(varn.split(',')) != 3:
     
    40694070        colorvals = colorvals + '@' + stdvn + '@' + unitsvn
    40704071        # Min/Max colorbar
    4071         shadminmax = colorvals.split('@')[4]
    4072         shading_nx = shadminmax.split(',')       
     4072        shadminmax = vecvals.split(',')[5]
     4073        shading_nx = shadminmax.split('|')
    40734074    else:
    40744075        print errormsg
  • trunk/tools/drawing_tools.py

    r1417 r1418  
    69276927          uvals[::yfreq,::xfreq], vvals[::yfreq,::xfreq],                            \
    69286928          veccolor[::yfreq,::xfreq], cmap=plt.get_cmap(vcolor), pivot='middle',      \
    6929           vmin=vsend[0], vmax=vsend[1])
     6929          clim = vsend)
    69306930        cbar = plt.colorbar()
    69316931
Note: See TracChangeset for help on using the changeset viewer.