Changeset 826 for issm/trunk
- Timestamp:
- 06/05/09 16:10:57 (16 years ago)
- Location:
- issm/trunk/src/m/classes/public/plot
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/plot/applyoptions.m
r27 r826 154 154 155 155 %latlon 156 if iscell(options_structure.latlon),156 if (iscell(options_structure.latlon) | ~isnan(options_structure.latlon)), 157 157 latlonoverlay(options_structure.latlon,options_structure.latlonnumbering); 158 158 end -
issm/trunk/src/m/classes/public/plot/latlonoverlay.m
r1 r826 10 10 % latlonoverlay(latlon,numbering) 11 11 12 %recover latstep and longstep 13 latstep=latlon{1}; 14 lonstep=latlon{2}; 15 resolution=latlon{3}; 16 color=latlon{4}; 12 %recover arguments (set default parameters if needed) 13 %1: latlon 14 if ~iscell(latlon), 15 latstep=3; 16 lonstep=3; 17 resolution=0.1; 18 color=[1 1 1]; 19 else 20 if length(latlon)<2 21 error('latlonoverlay error message: at least 2 arguments are required, or use ''on'' option.'); 22 end 23 if length(latlon)==2, 24 latstep=latlon{1}; 25 lonstep=latlon{2}; 26 resolution=0.1; 27 color=[1 1 1]; 28 elseif length(latlon)==3, 29 latstep=latlon{1}; 30 lonstep=latlon{2}; 31 resolution=latlon{3}; 32 color=[1 1 1]; 33 else 34 latstep=latlon{1}; 35 lonstep=latlon{2}; 36 resolution=latlon{3}; 37 color=latlon{4}; 38 end 39 end 17 40 18 if ~iscell(numbering), 41 %2: numbering 42 if ~iscell(numbering) & isnan(numbering), 19 43 numbering=0; 20 44 else 21 latgap=numbering{1}; 22 longap=numbering{2}; 23 colornumber=numbering{3}; 24 latangle=numbering{4}; 25 lonangle=numbering{5}; 26 numbering=1; 45 if ~iscell(numbering), 46 if strcmpi(char(numbering),'on'), 47 latgap=2; 48 longap=2; 49 colornumber=[1 1 1]; 50 latangle=0; 51 lonangle=0; 52 numbering=1; 53 else 54 numbering=0; 55 end 56 else 57 latgap=numbering{1}; 58 longap=numbering{2}; 59 colornumber=numbering{3}; 60 latangle=numbering{4}; 61 lonangle=numbering{5}; 62 numbering=1; 63 end 27 64 end 28 65 -
issm/trunk/src/m/classes/public/plot/plot_overlay.m
r819 r826 60 60 61 61 %Apply options, without colorbar and without grid 62 iscolorbar=(options_structure.colorbar==1 | isnan(options_structure.colorbar)); 62 63 options_structure.colorbar=0; 63 64 … … 65 66 66 67 %colorbar 67 if options_structure.colorbar,68 if iscolorbar, 68 69 69 70 %create colorbar with correct colors and position … … 72 73 colorbar_image_handle=get(colorbar_handle,'Children'); 73 74 set(colorbar_image_handle,'CData',colorbar_rgb); 74 if options_structure.colorbarpos,75 if ~isnan(options_structure.colorbarpos), 75 76 set(colorbar_handle,'Position',options_structure.colorbarpos); 77 else 78 set(colorbar_handle,'Position',[0.82 0.65 0.03 0.2]) 76 79 end 77 80 … … 88 91 for i=1:numvalues, 89 92 fraction=(scalevalues(i)-scaleminmax(1))/(scaleminmax(2)-scaleminmax(1)); 90 scalevalues(i)=exp(min(log(data))+(max(log(data))-min(log(data)))*fraction); 91 93 scalevalues(i)=round_ice(exp(min(log(data))+(max(log(data))-min(log(data)))*fraction),1); 92 94 scalestring=[scalestring; sprintf('%8.4g',scalevalues(i))]; 93 95 end 94 96 set(colorbar_handle,'YTickLabel',scalestring); 95 97 set(colorbar_handle,'YColor','y'); 96 set(colorbar_handle,'FontSize',1 6);98 set(colorbar_handle,'FontSize',14); 97 99 end 98 100 -
issm/trunk/src/m/classes/public/plot/plotdoc.m
r345 r826 93 93 disp(' ''designvariable'': name of design variable for importance factors'); 94 94 disp(' ''responsefunction'': name of response function for importance factors'); 95 disp(' ''latlon'': {latstep lonstep resolution color} where latstep,longstep and resolution are in degrees, color is a [r g b] array');96 disp(' ''latlonnumbering'': {latgap longap colornumber latangle lonangle} where latgap and longap are pixel gaps for the numbers,');95 disp(' ''latlon'': ''on'' or {latstep lonstep [resolution [color]]} where latstep,longstep and resolution are in degrees, color is a [r g b] array'); 96 disp(' ''latlonnumbering'': ''on'' or {latgap longap colornumber latangle lonangle} where latgap and longap are pixel gaps for the numbers,'); 97 97 disp(' colornumber is a [r g b] array and latangle and lonangle are angles to flip the numbers'); 98 98 disp(' ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio [width]]] where (x0,y0) are the coordinates of the base, and ratio=headlength/length');
Note:
See TracChangeset
for help on using the changeset viewer.