Changeset 18917


Ignore:
Timestamp:
12/03/14 14:52:01 (10 years ago)
Author:
Mathieu Morlighem
Message:

CHG: make plot_scatter work for R2014b

File:
1 edited

Legend:

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

    r18250 r18917  
    3737
    3838%OK, should we create a new colorbar for the occasion?
    39 if isempty(findobj(gcf,'tag','TMW_COLORBAR')),
     39if isempty(findobj(gcf,'tag','TMW_COLORBAR')) && isempty(findobj(gcf,'Type','Colorbar')),
    4040        alreadyplot=false;
    4141else
     
    4646if (alreadyplot),
    4747        phch = get(findall(gcf,'type','image','tag','TMW_COLORBAR'),{'parent'});
    48         h    = phch{1};
    49         ylim=get(h,'YLim');
     48        if ~isempty(phch),
     49                h    = phch{1};
     50                ylim=get(h,'YLim');
     51        else
     52                %R2014b +
     53                h = findobj(gcf,'Type','Colorbar');
     54                ylim = h.Limits;
     55        end
    5056        palette=colormap;
    5157        numcolors=size(palette,1);
Note: See TracChangeset for help on using the changeset viewer.