Changeset 385 in lmdz_wrf


Ignore:
Timestamp:
Mar 30, 2015, 5:32:45 PM (10 years ago)
Author:
lfita
Message:

Fixing title in all graphics to cope with '_'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing_tools.py

    r383 r385  
    23072307    plt.xlabel(ttit)
    23082308    plt.ylabel(vtit + " (" + vunits + ")")
    2309     plt.title(tit)
     2309    plt.title(tit).replace('_','\_').replace('&','\&')
    23102310
    23112311    figname = hfileout + '_' + vtit
     
    24282428
    24292429    figname = ifile.replace('.','_') + '_' + vtit
    2430     graphtit = vtit.replace('_','\_')
     2430    graphtit = vtit.replace('_','\_').replace('&','\&')
    24312431
    24322432    plt.title(graphtit)
     
    25712571
    25722572    figname = ifile.replace('.','_') + '_' + vtit
    2573     graphtit = vtit.replace('_','\_')
     2573    graphtit = vtit.replace('_','\_').replace('&','\&')
    25742574
    25752575    if zvalue != 'null':
     
    26922692
    26932693    figname = ifile.replace('.','_') + '_' + vtit
    2694     graphtit = vtit.replace('_','\_')
     2694    graphtit = vtit.replace('_','\_').replace('&','\&')
    26952695
    26962696    plt.title(graphtit)
     
    28582858          linewidth=3, label= obsname)
    28592859
    2860     plt.title(graphtit)
     2860    plt.title(graphtit).replace('_','\_').replace('&','\&')
    28612861    plt.legend()
    28622862   
     
    29942994    cbar.set_label('height ($m$)')
    29952995
    2996     plt.title(graphtit)
     2996    plt.title(graphtit).replace('_','\_').replace('&','\&')
    29972997   
    29982998    output_kind(kfig, figname, closeif)
     
    31373137
    31383138    figname = 'domain_boxes'
    3139     graphtit = gtit.replace('_','\_')
     3139    graphtit = gtit.replace('_','\_').replace('&','\&')
    31403140    cbar.set_label('height ($m$)')
    31413141
     
    38253825                        y[i,:] = dimyv
    38263826
    3827 #    plt.rc('text', usetex=True)
     3827    plt.rc('text', usetex=True)
    38283828
    38293829    plt.pcolormesh(x, y, varsv, cmap=plt.get_cmap(colorbar), vmin=vs[0], vmax=vs[1])
     
    48454845
    48464846    figname = 'lines'
    4847     graphtit = gtit
     4847    graphtit = gtit.replace('_','\_').replace('&','\&')
    48484848
    48494849    plt.title(graphtit)
     
    49204920
    49214921    figname = 'lines_time'
    4922     graphtit = gtit
     4922    graphtit = gtit.replace('_','\_').replace('&','\&')
    49234923
    49244924    plt.title(graphtit)
Note: See TracChangeset for help on using the changeset viewer.