Changeset 16319


Ignore:
Timestamp:
10/07/13 16:07:44 (11 years ago)
Author:
Mathieu Morlighem
Message:

CHG: minor improvements

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

Legend:

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

    r13730 r16319  
    1111options=removefield(options,'log',0);
    1212[data datatype]=processdata(md,datain,options);
     13if isempty(data), error('data provided is empty'); end
    1314
    1415%check is2d
     
    225226                        hold on     
    226227                else
    227                         h=[h;patch('Xdata',[xc;NaN],'Ydata',[yc;NaN],'facecolor','none','edgecolor',color,'linewidth',linewidth)];
     228                        dist = 5000;
     229                        if (max(xc)-min(xc)+max(yc)-min(yc))<dist, continue; end
     230                        h=patch('Xdata',[xc;NaN],'Ydata',[yc;NaN],'facecolor','none','edgecolor',map(i,:),'linewidth',linewidth);
     231                        c = horzcat([level, xc'; length(xc), yc']);
     232                        clabel(c,h,'FontSize',10,'labelspacing',20000,'color',map(i,:));
    228233                        hold on
    229234                end
     
    231236                % Update the CS data structure as per "contours.m"
    232237                % so that clabel works
    233                 c = horzcat(c,[level, xc'; length(xc), yc']);
     238                %c = horzcat(c,[level, xc'; length(xc), yc']);
    234239
    235240        end
     
    241246                clabel(c,h);
    242247        else
    243                 clabel(c,h,'color',color,'FontSize',14);
    244         end
    245 end
     248                %clabel(c,h,'color',color,'FontSize',10,'labelspacing',20000);
     249                clabel(c,h,'FontSize',10,'labelspacing',20000);
     250        end
     251end
  • issm/trunk-jpl/src/m/plot/plot_overlay.m

    r13646 r16319  
    33%
    44%   Usage:
    5 %      plot_overlay(md,options,plotlines,plotcols,i)
     5%      plot_overlay(md,data,options,plotlines,plotcols,i)
    66%
    77%   See also: PLOTMODEL
Note: See TracChangeset for help on using the changeset viewer.