Changeset 1976 in lmdz_wrf
- Timestamp:
- Jul 25, 2018, 3:31:34 PM (7 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/drawing.py
r1973 r1976 2549 2549 # Legend 2550 2550 locleg, legfontsize = drw.legend_values(legvals,'|') 2551 legconf = [locleg, legfontsize] 2551 2552 2552 2553 # Getting values … … 2732 2733 2733 2734 # Times 2735 ranget = [mintval, maxtval] 2734 2736 2735 2737 dtvals = (maxtval - mintval)/dimt … … 2769 2771 2770 2772 drw.plot_lines_time(dimvalues, varvalues, valuesaxis, xaxis, yaxis, dimtit, \ 2771 legvals, vartit, varunits, timepos, timelabels, title, l ocleg, legfontsize,\2773 legvals, vartit, varunits, timepos, timelabels, title, legconf, ranget, \ 2772 2774 graphk, valmin, valmax, lines, collines, points, linewidths, pointsizes, \ 2773 2775 pointfreq, close) -
trunk/tools/drawing_tools.py
r1974 r1976 6489 6489 6490 6490 def 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, \ 6492 6492 ptf, ifclose): 6493 6493 """ Function to plot a collection of lines with a time axis … … 6506 6506 vmin= minimum value for the axis-value 'auto' for use the extreme 6507 6507 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] 6513 6515 kfig= kind of figure 6514 6516 lsl= ',' list of line styles … … 6642 6644 xmax = vmax 6643 6645 6646 plt.yticks(tpos, tlabs) 6647 6644 6648 plt.xlim(xmin,xmax) 6645 6649 plt.ylim(xtrmdv[0],xtrmdv[1]) 6646 6647 plt.yticks(tpos, tlabs)6648 6650 else: 6649 6651 for il in range(Ntraj): … … 6680 6682 ymax = vmax 6681 6683 6682 plt.xlim(xtrmdv[0],xtrmdv[1])6683 plt.ylim(ymin,ymax)6684 6685 6684 # plt.xlim(np.min(varTdv),np.max(varTdv)) 6686 6685 # plt.ylim(np.min(varTvv),np.max(varTvv)) 6687 6686 plt.xticks(tpos, tlabs) 6687 plt.xlim(xtrmdv[0],xtrmdv[1]) 6688 plt.ylim(ymin,ymax) 6688 6689 6689 6690 figname = 'lines_time' … … 6692 6693 plt.title(graphtit) 6693 6694 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]}) 6695 6697 6696 6698 output_kind(kfig, figname, ifclose)
Note: See TracChangeset
for help on using the changeset viewer.