Changeset 21435


Ignore:
Timestamp:
12/08/16 07:02:26 (8 years ago)
Author:
aplach
Message:

applyoptions.py+plotdoc.py: python plotmodel options 'colorbarticks' and 'colorbarfontsize' added

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

Legend:

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

    r21303 r21435  
    234234                cb.set_alpha(1)
    235235                cb.draw_all()
     236                if options.exist('colorbarfontsize'):
     237                        colorbarfontsize=options.getfieldvalue('colorbarfontsize')
     238                        cb.ax.tick_params(labelsize=colorbarfontsize)
     239                        # cb.set_ticks([0,-10])
     240                        # cb.set_ticklabels([-10,0,10])
     241                if options.exist('colorbarticks'):
     242                        colorbarticks=options.getfieldvalue('colorbarticks')
     243                        cb.set_ticks(colorbarticks)
    236244                plt.sca(ax) # return to original axes control
    237245        # }}}
  • issm/trunk-jpl/src/m/plot/plotdoc.py

    r21427 r21435  
    4848       
    4949        pyoptions={'axis':" show ('on') or hide ('off') axes",
    50                                                 'caxis':" modify  colorbar range. (array of type [a b] where b>=a)",
     50                                                'caxis':" modify  colorbar range. (array of type [a b] where b>=a)",
    5151                                                 'colorlevels':" N, number of levels to use",
    5252                                                 'colorbar':" add colorbar (string 'on','off' or 'one')",
    5353                                                 'axes_pad':" spacing between axes (default is 0.25)",
    5454                                                 'colorbartitle':" colorbar title (string)",
     55                                                 'colorbarticks':" set colorbar ticks manually (list)",
     56                                                 'colorbarfontsize':" specify colorbar fontsize",
    5557                                                 'colormap':" change the default colormap ('viridis' is the default)",
    56                                                 'contourlevels':" N or [value1,...] add the contours of the specified values or N contours",
     58                                                'contourlevels':" N or [value1,...] add the contours of the specified values or N contours",
    5759                                                 'streamlines':" TOFIX argument does nothing",
    5860                                                 'edgecolor':" color of mesh edges. RGB tuple or standard string",
     
    9799                                                         'colorbarcornerposition':" 'West','North',etc ...",
    98100                                                         'colorbartitlerotation':" -90, etc ...",
    99                                                          'colorbarfontsize':" specify colorbar fontsize",
    100101                                                         'colorbarwidth':" multiplier (default 1) to the default width colorbar",
    101102                                                         'colorbarheight':" multiplier (default 1) to the default height colorbar",
     
    163164
    164165
    165 
    166166        print("   Plot usage: plotmodel(model,varargin)")
    167167        print("   plotting is done with couples of keywords values, the type and style of data to display is given by one (or several) of the followings")
Note: See TracChangeset for help on using the changeset viewer.