Changeset 6494


Ignore:
Timestamp:
11/04/10 09:59:17 (14 years ago)
Author:
Mathieu Morlighem
Message:

Colorbar does not need to be created by plotoverlay, it is just a colormap hsv (works beautifully)

Location:
issm/trunk/src/m/model/plot
Files:
2 edited

Legend:

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

    r6490 r6494  
    123123                b = [ones(1,n),(n-1:-1:0)/n];
    124124                c = [r(:), g(:), b(:)];
     125        elseif strcmpi(cname,'Rignot'),
     126                c = hsv;
    125127        else
    126128                c = cname;
  • issm/trunk/src/m/model/plot/plot_overlay.m

    r6493 r6494  
    109109
    110110%Apply options, without colorbar and without grid
    111 iscolorbar=getfieldvalue(options,'colorbar',1);
    112 options=changefieldvalue(options,'colorbar',0);                %do not create colorbar, we will take care of it
     111options=changefieldvalue(options,'colormap','hsv');                %do not create colorbar, we will take care of it
    113112options=changefieldvalue(options,'caxis',[data_min data_max]); %force caxis so that the colorbar is ready
    114113options=addfielddefault(options,'axis','equal off');           %default axis
    115114applyoptions(md,data,options);
    116 
    117 %Create Colorbar {{{1
    118 if iscolorbar,
    119 
    120         h=colorbar;
    121         set(h,'FontSize',getfieldvalue(options,'colorbarfontsize',14));
    122         set(h,'YColor',getfieldvalue(options,'FontColor','k'));
    123         h2=get(h,'Children');
    124         set(h2,'CData',colorbar_rgb);
    125         %colormap([colorbar_rgb(:,1,1) colorbar_rgb(:,1,2) colorbar_rgb(:,1,3)]);
    126 
    127         if exist(options,'colorbarpos'),
    128                 set(h,'Position',getfieldvalue(options,'colorbarpos'));
    129         end
    130         if exist(options,'colorbartitle'),
    131                 backup=gca;
    132                 axes(colorbar_handle);lab=title(getfieldvalue(options,'colorbartitle'),'Color',getfieldvalue(options,'FontColor','k'));
    133                 set(lab,'Rotation',getfieldvalue(options,'colorbartitlerotation',0));
    134                 set(lab,'VerticalAlignment','bottom');
    135                 axes(backup);
    136         end
    137 
    138 end%}}}
Note: See TracChangeset for help on using the changeset viewer.