Changeset 21933


Ignore:
Timestamp:
08/10/17 10:26:30 (8 years ago)
Author:
Mathieu Morlighem
Message:

CHG: use plot instead of plot3

File:
1 edited

Legend:

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

    r18917 r21933  
    88%      'caxis'      : default is full range
    99%      'MarkerSize' : default is 3
     10%      'subset'     : only plot the indices provided
    1011%      'Line'       : use line instead of circles
    1112%      'Cutoff'     : cut the line if the distance between 2 points is
     
    2122if numel(x)~=numel(y) | numel(x)~=numel(level),
    2223        error('x, y and data should have the same size');
     24end
     25
     26if exist(options,'subset'),
     27        pos=getfieldvalue(options,'subset');
     28        x=x(pos);
     29        y=y(pos);
     30        level=level(pos);
    2331end
    2432
     
    5967else
    6068        palette=getcolormap(options);
     69        colormap(palette);
    6170        numcolors=size(palette,1);
    6271        levels=round_ice(linspace(Min,Max,numcolors+1),2);
     
    7685        for i=1:numcolors
    7786                pos=find(colorind==i);
    78                 hprime=plot3(x(pos),y(pos),ones(size(x(pos))),...
     87        %       hprime=plot3(x(pos),y(pos),ones(size(x(pos))),...
     88                hprime=plot(x(pos),y(pos),...
    7989                        'o','MarkerSize',getfieldvalue(options,'MarkerSize',3),'MarkerEdgeColor',palette(i,:),...
    8090                        'MarkerFaceColor',palette(i,:));
Note: See TracChangeset for help on using the changeset viewer.