Changeset 1976 in lmdz_wrf


Ignore:
Timestamp:
Jul 25, 2018, 3:31:34 PM (7 years ago)
Author:
lfita
Message:

Adding time-range in `draw_lines_time' and some minor changes

Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing.py

    r1973 r1976  
    25492549    # Legend
    25502550    locleg, legfontsize = drw.legend_values(legvals,'|')
     2551    legconf = [locleg, legfontsize]
    25512552
    25522553# Getting values
     
    27322733
    27332734# Times
     2735    ranget = [mintval, maxtval]
    27342736
    27352737    dtvals = (maxtval - mintval)/dimt
     
    27692771
    27702772    drw.plot_lines_time(dimvalues, varvalues, valuesaxis, xaxis, yaxis, dimtit,      \
    2771       legvals, vartit, varunits, timepos, timelabels, title, locleg, legfontsize,    \
     2773      legvals, vartit, varunits, timepos, timelabels, title, legconf, ranget,        \
    27722774      graphk, valmin, valmax, lines, collines, points, linewidths, pointsizes,       \
    27732775      pointfreq, close)
  • trunk/tools/drawing_tools.py

    r1974 r1976  
    64896489
    64906490def plot_lines_time(vardv, varvv, vaxis, xaxv, yaxv, dtit, linesn0, vtit, vunit,     \
    6491   tpos, tlabs, gtit, gloc, gsize, kfig, vmin, vmax, lsl, coll, ptl, lwidth, psize,   \
     6491  tpos, tlabs, gtit, legv, trng, kfig, vmin, vmax, lsl, coll, ptl, lwidth, psize,    \
    64926492  ptf, ifclose):
    64936493    """ Function to plot a collection of lines with a time axis
     
    65066506      vmin= minimum value for the axis-value 'auto' for use the extreme
    65076507      vmax= maximum value for the axis-value 'auto' for use the extreme
    6508       gloc= location of the legend (0, autmoatic)
    6509         1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',
    6510         5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',
    6511         9: 'upper center', 10: 'center'
    6512       gsize= fontsize of the legend
     6508      legv = [gloc, gsize] legend values
     6509        gloc= location of the legend (0, autmoatic)
     6510          1: 'upper right', 2: 'upper left', 3: 'lower left', 4: 'lower right',
     6511          5: 'right', 6: 'center left', 7: 'center right', 8: 'lower center',
     6512          9: 'upper center', 10: 'center'
     6513        gsize= fontsize of the legend
     6514      trng= actual range of time values [tmin, tmax]
    65136515      kfig= kind of figure
    65146516      lsl= ',' list of line styles
     
    66426644            xmax = vmax
    66436645
     6646        plt.yticks(tpos, tlabs)
     6647
    66446648        plt.xlim(xmin,xmax)
    66456649        plt.ylim(xtrmdv[0],xtrmdv[1])
    6646 
    6647         plt.yticks(tpos, tlabs)
    66486650    else:
    66496651        for il in range(Ntraj):
     
    66806682            ymax = vmax
    66816683
    6682         plt.xlim(xtrmdv[0],xtrmdv[1])
    6683         plt.ylim(ymin,ymax)
    6684 
    66856684#        plt.xlim(np.min(varTdv),np.max(varTdv))
    66866685#        plt.ylim(np.min(varTvv),np.max(varTvv))
    66876686        plt.xticks(tpos, tlabs)
     6687        plt.xlim(xtrmdv[0],xtrmdv[1])
     6688        plt.ylim(ymin,ymax)
    66886689
    66896690    figname = 'lines_time'
     
    66926693    plt.title(graphtit)
    66936694    if linesn0 is not None:
    6694         plt.legend(loc=gloc, prop={'size':gsize})
     6695        print 'Lluis: legv:', legv
     6696        plt.legend(loc=legv[0], prop={'size':legv[1]})
    66956697
    66966698    output_kind(kfig, figname, ifclose)
Note: See TracChangeset for help on using the changeset viewer.