Changeset 19428


Ignore:
Timestamp:
07/07/15 13:12:36 (10 years ago)
Author:
glperez
Message:

CHG: Updates to applyoptions.py courtesy of Alvin Liang.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/applyoptions.py

    r19424 r19428  
    22from cmaptools import truncate_colormap
    33from plot_contour import plot_contour
    4 from expdisp import expdisp
    54
    65try:
    76        from matplotlib.ticker import MaxNLocator
    87        from mpl_toolkits.axes_grid1 import make_axes_locatable
     8        from mpl_toolkits.mplot3d import Axes3D
    99        import matplotlib as mpl
    1010        import pylab as p
     
    2424
    2525                See also: PLOTMODEL, PARSE_OPTIONS
     26
    2627        '''
    2728
     
    133134
    134135        #view
     136        if int(md.mesh.dimension) == 3 and options.exist('layer'):
     137                #options.getfieldvalue('view') ?
     138                ax=fig.gca(projection='3d')
     139        plt.show()
    135140
    136141        #axis {{{
     
    143148
    144149        #box
     150        if options.exist('box'):
     151                eval(options.getfieldvalue('box'))
    145152
    146153        #xlim, ylim, zlim {{{
     
    173180
    174181        #shading
     182        if options.exist('shading'):
    175183
    176184        #grid {{{
     
    235243                                cb.set_label(options.getfieldvalue('colorbartitle'),fontsize=fontsize)
    236244                cb.ax.tick_params(labelsize=fontsize)
    237                 cb.solids.set_rasterized(True)
    238245                cb.update_ticks()
    239                 cb.set_alpha(1)
    240                 cb.draw_all()
    241246                plt.sca(ax) # return to original axes control
    242247        #}}}
    243248
    244         #expdisp {{{
    245         if options.exist('expdisp'):
    246             filename=options.getfieldvalue('expdisp')
    247             style=options.getfieldvalue('expstyle','k')
    248             linewidth=options.getfieldvalue('explinewidth',1)
    249             for i in xrange(len(filename)):
    250                 filenamei=filename[i]
    251                 stylei=style[i]
    252                 if type(linewidth)==list:
    253                     linewidthi=linewidth[i]
    254                 else:
    255                     linewidthi=linewidth
    256                 expdisp(filenamei,ax,linestyle=stylei,linewidth=linewidthi,unitmultiplier=options.getfieldvalue('unit',1))
    257         #}}}
    258 
    259249        #area
     250
     251        #expdisp
    260252
    261253        #text {{{
Note: See TracChangeset for help on using the changeset viewer.