Changeset 2498


Ignore:
Timestamp:
10/22/09 15:56:53 (16 years ago)
Author:
Eric.Larour
Message:

Added colorbar options.

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

Legend:

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

    r2439 r2498  
    9999%colorbar
    100100if getfieldvalue(options,'colorbar',1)~=0,
    101         c=colorbar;set(c,'FontSize',fontsize);
     101        if ~isnan(options_structure.colorbarcornerposition),
     102                c=colorbar(options_structure.colorbarcornerposition);
     103        else
     104                c=colorbar;
     105        end
     106        set(c,'FontSize',fontsize);
    102107        if exist(options,'wrapping')
    103108                lim=get(c,'Ylim');
     
    127132        if exist(options,'colorbartitle'),
    128133                backup=gca;
    129                 axes(c);lab=ylabel(getfieldvalue(options,'colorbartitle'));set(lab,'Rotation',-90);set(lab,'VerticalAlignment','bottom');
     134                axes(c);lab=ylabel(options_structure.colorbartitle);
     135                if ~isnan(options_structure.colorbartitlerotation),
     136                        set(lab,'Rotation',options_structure.colorbartitlerotation);
     137                else
     138                        set(lab,'Rotation',-90);
     139                end
     140                set(lab,'VerticalAlignment','bottom');
    130141                axes(backup);
    131142        end
     
    193204        plot_contour(md,data,options);
    194205end
     206
     207%axes position
     208if ~isnan(options_structure.axesPosition)
     209        set(gca,'Position',options_structure.axesPosition);
     210end
  • issm/trunk/src/m/classes/public/plot/plotdoc.m

    r2450 r2498  
    5757disp('       ''colorbartitle'': colorbar title (string)');
    5858disp('       ''colorbarpos'': [x,y,dx,dy] where x,y,dx and dy are within [0 1]');
     59disp('       ''colorbarcornerposition'': ''West'',''North'',etc ...');
     60disp('       ''colorbartitlerotation'': -90, etc ...');
    5961disp('       ''colormap'': same as standard matlab option (''jet'',''HSV'',''cool'',''spring'',''gray'',...)');
    6062disp('       ''contourlevels'': N or {value1,valu2,value3,...} add the contours of the specified values or N contours');
Note: See TracChangeset for help on using the changeset viewer.