Changeset 11161
- Timestamp:
- 01/19/12 16:12:21 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/model/plot/plot_scatter.m
r10305 r11161 1 1 function plot_scatter(x,y,mksize,level), 2 2 3 alreadyplot=true; 3 %check input 4 if numel(x)~=numel(y) | numel(x)~=numel(level), 5 error('x, y and data should have the same size'); 6 end 4 7 5 8 %Some processing … … 8 11 Siz=length(level); 9 12 nlab=10; 13 14 %OK, should we create a new colorbar for the occasion? 15 if isempty(findobj(gcf,'tag','TMW_COLORBAR')), 16 alreadyplot=false; 17 else 18 alreadyplot=true; 19 end 10 20 11 21 %generate levels … … 51 61 warning off MATLAB:log:logOfZero; 52 62 for i = 1:nlab 53 if abs(min(log10(abs(tick_vals)))) <= 3, fm = '%-4.0f'; % fixed54 else 63 if min(log10(abs(tick_vals))) <= 3, fm = '%-4.0f'; % fixed 64 else fm = '%-4.0E'; % floating 55 65 end 56 66 labels{i} = sprintf(fm,tick_vals(i)); … … 60 70 % set tick label strings 61 71 set(h,'YTickLabel',labels); 62 colorbar %one last time required sometimes72 %colorbar %one last time required sometimes 63 73 end
Note:
See TracChangeset
for help on using the changeset viewer.