Changeset 3547


Ignore:
Timestamp:
04/15/10 15:57:48 (15 years ago)
Author:
Mathieu Morlighem
Message:

colorbar legend on top

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

Legend:

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

    r3526 r3547  
    155155        if exist(options,'colorbartitle'),
    156156                backup=gca;
    157                 axes(c);lab=ylabel(getfieldvalue(options,'colorbartitle'));
    158                 set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',-90));
     157                axes(c);lab=title(getfieldvalue(options,'colorbartitle'),'Color',getfieldvalue(options,'FontColor','k'));
     158                set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',0));
    159159                set(lab,'VerticalAlignment','bottom');
    160160                axes(backup);
     
    205205%Scale ruler
    206206if exist(options,'scaleruler'),
    207         scaleruler(getfieldvalue(options,'scaleruler'));
     207        scaleruler(options);
    208208end
    209209
  • issm/trunk/src/m/classes/public/plot/latlonoverlay.m

    r2698 r3547  
    1919%1: latlon
    2020if ~iscell(latlon),
    21         latstep=3;
    22         lonstep=3;
    23         resolution=0.1;
    24         color=[1 1 1];
     21        if ischar(latlon) & strcmpi(latlon,'on'),
     22                latstep=3;
     23                lonstep=3;
     24                resolution=0.1;
     25                color=[1 1 1];
     26        else
     27                return;
     28        end
    2529else
    2630        if length(latlon)<2
  • issm/trunk/src/m/classes/public/plot/plot_manager.m

    r3526 r3547  
    159159        %compute inset position
    160160        PosInset=[cplotpos(1)+insetpos(1)*cplotpos(3),cplotpos(2)+insetpos(2)*cplotpos(4), insetpos(3)*cplotpos(3), insetpos(4)*cplotpos(4)];
     161        %show pos
     162        if strcmpi(getfieldvalue(options,'showinset','off'),'on')
     163                X1=getfieldvalue(options,'insetx',[min(x) max(x)]);
     164                Y1=getfieldvalue(options,'insety',[min(y) max(y)]);
     165                line(X1([1 2 2 1 1]),Y1([1 1 2 2 1]),zeros(1,5),'Color','k','LineWidth',2);
     166        end
    161167
    162168        %plot inset
     
    168174        options=changefieldvalue(options,'colorbar',0);
    169175        options=changefieldvalue(options,'text',{});
     176        options=changefieldvalue(options,'latlon','off');
    170177        options=changefieldvalue(options,'axis','equal off');
    171178        options=changefieldvalue(options,'xlim',getfieldvalue(options,'insetx',[min(x) max(x)]));
  • issm/trunk/src/m/classes/public/plot/plot_overlay.m

    r3526 r3547  
    106106%P=get(gca,'pos');
    107107%P(3)=P(3)+0.05;
    108 %P(2)=P(2)+0.10;
     108%P(2)=P(2)+0.08;
    109109%P(1)=P(1)-0.02;
    110110%set(gca,'pos',P);
     
    155155        end
    156156        set(colorbar_handle,'YTickLabel',scalestring);
    157         set(colorbar_handle,'YColor','k');
     157        set(colorbar_handle,'YColor',getfieldvalue(options,'FontColor','k'));
     158        if exist(options,'colorbartitle'),
     159                backup=gca;
     160                axes(colorbar_handle);lab=title(getfieldvalue(options,'colorbartitle'),'Color',getfieldvalue(options,'FontColor','k'));
     161                set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',0));
     162                set(lab,'VerticalAlignment','bottom');
     163                axes(backup);
     164        end
    158165end%}}}
  • issm/trunk/src/m/classes/public/plot/plot_unit.m

    r2439 r3547  
    99%edgecolor
    1010edgecolor=getfieldvalue(options,'edgecolor','none');
     11%P=get(gca,'pos');
     12%P(3)=P(3)+0.05;
     13%P(1)=P(1)-0.02;
     14%set(gca,'pos',P);
    1115
    1216%regular plot
  • issm/trunk/src/m/classes/public/plot/plotdoc.m

    r3338 r3547  
    7676disp('       ''fontsize'': same as standard matlab option (normal: ''n'',bold: ''b'',light: ''l'',demi: ''d'')');
    7777disp('       ''fontweight'': same as standard matlab option (10,14,...)');
     78disp('       ''fontcolor'': same as standard matlab option');
    7879disp('       ''highlight'': highlights certain grids or elements when using ''gridnumbering'' or ''elementnumbering'' or ''highlightgrids '' or ''highlightelements'' option');
    7980disp('       ''resolution'': resolution used by section value (array of type [horizontal_resolution vertical_resolution])');
  • issm/trunk/src/m/classes/public/plot/scaleruler.m

    r2830 r3547  
    1 function scaleruler(structure)
     1function scaleruler(options)
    22%SCALERULER - overlay a scale ruler on current plot
    33%
    44%   Usage:
    5 %      scaleruler(structure)
     5%      scaleruler(options)
     6
     7%get options
     8structure=getfieldvalue(options,'scaleruler');
     9fontsize=getfieldvalue(options,'fontsize',16);
    610
    711%Go through structure and fill missing arguments
     
    2832xt=Bu(1);
    2933yt=Bu(2)+2*widthscale;
    30 text(xt,yt,num2str(Tick),'FontSize',13,'FontWeight','b');
     34text(xt,yt,num2str(Tick),'FontSize',fontsize,'FontWeight','b');
    3135
    3236%loope over the patches
     
    5256        yt=Bu(2)+2*widthscale;
    5357        if i~=numberofticks-1,
    54                 text(xt,yt,num2str(round_ice(Tick/1000,3)),'FontSize',13,'FontWeight','b');
     58                text(xt,yt,num2str(round_ice(Tick/1000,3)),'FontSize',fontsize,'FontWeight','b');
    5559        end
    5660end
    57 text(xt,yt,[num2str(round_ice(Tick/1000,3)) ' km'],'FontSize',13,'FontWeight','b');
     61text(xt,yt,[num2str(round_ice(Tick/1000,3)) ' km'],'FontSize',fontsize,'FontWeight','b');
Note: See TracChangeset for help on using the changeset viewer.