Changeset 2256


Ignore:
Timestamp:
09/17/09 14:27:52 (15 years ago)
Author:
Eric.Larour
Message:

Added colorbartitle option.

Location:
issm/trunk/src/m/classes/public/plot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/plot/applyoptions.m

    r1745 r2256  
    134134                         set(c,'FontSize',fontsize);
    135135                end
     136                if ~isnan(options_structure.colorbartitle),
     137                        axes(c);lab=ylabel(options_structure.colorbartitle);set(lab,'Rotation',-90);set(lab,'VerticalAlignment','bottom');
     138                end
    136139        %colorbar OFF
    137140        elseif options_structure.colorbar==0,
     
    147150        if ~isnan(options_structure.colorbarpos),
    148151                set(c,'Position',options_structure.colorbarpos);
     152        end
     153        if ~isnan(options_structure.colorbartitle),
     154                axes(c);lab=ylabel(options_structure.colorbartitle);set(lab,'Rotation',-90);set(lab,'VerticalAlignment','bottom');
    149155        end
    150156end
  • issm/trunk/src/m/classes/public/plot/parse_options.m

    r2242 r2256  
    268268else
    269269        options_struct.title=NaN;
     270end
     271
     272%colorbartitle
     273colorbartitlevalues=findarg(optionstring,'colorbartitle');
     274if ~isempty(colorbartitlevalues),
     275        if ischar(colorbartitlevalues.value) | iscell(colorbartitlevalues.value),
     276                options_struct.colorbartitle=colorbartitlevalues.value;
     277        else
     278                error('plot error message: colorbartitle option must be a string');
     279        end
     280else
     281        options_struct.colorbartitle=NaN;
    270282end
    271283
  • issm/trunk/src/m/classes/public/plot/plotdoc.m

    r2253 r2256  
    5353disp('       ''colorlevels'':  N or {value1,valu2,value3,...} used if quiver, use different colors for the given number of colors or limits');
    5454disp('       ''colorbar'': add colorbar (string ''on'' or ''off'')');
     55disp('       ''colorbartitle'': colorbar title (string)');
    5556disp('       ''colorbarpos'': [x,y,dx,dy] where x,y,dx and dy are within [0 1]');
    5657disp('       ''colormap'': same as standard matlab option (''jet'',''HSV'',''cool'',''spring'',''gray'',...)');
Note: See TracChangeset for help on using the changeset viewer.