Changeset 14252


Ignore:
Timestamp:
01/15/13 13:47:08 (12 years ago)
Author:
cborstad
Message:

CHG: updated default tick label notation, option for number of ticks in colorbar

Location:
issm/trunk-jpl/src/m/plot
Files:
3 edited

Legend:

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

    r13957 r14252  
     1from matplotlib.ticker import MaxNLocator
    12
    23try:
     
    107108        #}}}
    108109
     110        #ticklabel notation {{{
     111        p.gca().ticklabel_format(style='sci',scilimits=(0,0))
     112        #}}}
     113
    109114        #ticklabelfontsize {{{
    110115        if options.exist('ticklabelfontsize'):
     
    116121                                label.set_fontsize(options.getfieldvalue('ticklabelfontsize'))
    117122        #}}}
     123
    118124        #view
    119125
     
    153159        #colorbar {{{
    154160        if 'on' in options.getfieldvalue('colorbar','off'):
    155                 p.colorbar()
     161                cb=p.colorbar()
     162                cb.locator=MaxNLocator(nbins=5) # default 5 ticks
     163                cb.update_ticks()
     164                if options.exist('colorbarnumticks'):
     165                        cb.locator=MaxNLocator(nbins=options.getfieldvalue('colorbarnumticks',5))
     166                        cb.update_ticks()
    156167        #}}}
    157168
  • issm/trunk-jpl/src/m/plot/plot_manager.py

    r13771 r14252  
    5757
    5858        #standard plot
    59         p.subplot(nlines,ncols,i)
     59        p.subplot(nlines,ncols,i,aspect='equal')
    6060
    6161        #plot unit
     
    6464        #apply all options
    6565        applyoptions(md,data2,options)
    66 
     66       
    6767        #ground overlay on kml plot_unit
  • issm/trunk-jpl/src/m/plot/plotmodel.py

    r14248 r14252  
    6565        else:
    6666                raise StandardError('plotmodel error message: no output data found.')
    67                        
Note: See TracChangeset for help on using the changeset viewer.