Changeset 983 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Aug 9, 2016, 11:23:33 AM (8 years ago)
Author:
lfita
Message:

Adding color names, lines style, point styles, lines width, point sizes, frequency and name of the figure in `dar_lines'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r955 r983  
    16641664    draw_lines(ncfilens, values, varname):
    16651665      ncfilens= [filen] ',' separated list of netCDF files
    1666       values= [dimvname]:[valuesaxis]:[dimtit]:[leglabels]:[vtit]:[title]:[locleg]:[graphk]
     1666      values= [dimvname]:[valuesaxis]:[dimtit]:[leglabels]:[vtit]:[title]:[locleg]:[colns]:[lines]
     1667       [points]:[lwdths]:[psizes]:[freqv]:[figname][graphk]
    16671668        [dimvname]: ',' list of names of the variable with he values of the common dimension
    16681669        [valuesaxis]: which axis will be used for the values ('x', or 'y')
     
    16751676          5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',
    16761677          9: 'upper center', 10: 'center'
     1678        [colns]= ',' list of color names ('None' for automatic, single value for all the same)
     1679        [lines]= ',' list of style of lines ('None' for automatic, single value for all the same)
     1680        [points]= ',' list of style of points ('None' for automatic, single value for all the same)
     1681        [lwdths]= ',' list of withs of lines ('None' for automatic, single value for all the same)
     1682        [psizes]= ',' list of size of points ('None' for automatic, single value for all the same)
     1683        [freqv]= frequency of values
     1684        [figname]= name of the figure
    16771685        [graphk]: kind of the graphic
    16781686      varname= variable to plot
     
    16871695        quit()
    16881696
    1689     expectargs = '[dimvname]:[valuesaxis]:[dimtit]:[leglabels]:[vtit]:[title]:[locleg]:[graphk]'
     1697    expectargs = '[dimvname]:[valuesaxis]:[dimtit]:[leglabels]:[vtit]:[title]:' +    \
     1698      '[locleg]:[colns]:[lines]:[points]:[lwdths]:[psizes]:[freqv]:[graphk]'
    16901699    drw.check_arguments(fname,values,expectargs,':')
    16911700
     
    16981707    title = values.split(':')[5].replace('|',' ')
    16991708    locleg = values.split(':')[6]
    1700     graphk = values.split(':')[7]
     1709    colns = str_list(values.split(':')[7], ',')
     1710    lines = str_list(values.split(':')[8], ',')
     1711    points = str_list(values.split(':')[9], ',')
     1712    lwdths = str_list(values.split(':')[10], ',')
     1713    psizes = str_list(values.split(':')[11], ',')
     1714    freqv = values.split(':')[12]
     1715    figname = values.split(':')[13]
     1716    graphk = values.split(':')[14]
    17011717
    17021718    Nfiles = len(ncfiles)
     
    17731789
    17741790    drw.plot_lines(dimvalues, varvalues, valuesaxis, dimtit, leglabels.split(','),   \
    1775       vartit, varunits, title, locleg, graphk)
     1791      vartit, varunits, title, locleg, colns, lines, points, lwdths, psizes, freqv,  \
     1792      figname,graphk)
    17761793
    17771794    return
Note: See TracChangeset for help on using the changeset viewer.