source: issm/trunk-jpl/src/m/model/plot/plot_tensor.m@ 11785

Last change on this file since 11785 was 11785, checked in by cborstad, 13 years ago

tensor components now in md.results

File size: 1.2 KB
Line 
1function plot_tensor(md,options,width,i,type);
2%PLOT_TENSOR - plot tensor components
3%
4% Usage:
5% plot_tensor(md,options,width,i);
6%
7% See also: PLOTMODEL
8
9h=subplot(width,width,i); axis off; pos=get(h,'Position');
10
11plot_options.offsetx=pos(1);
12plot_options.offsety=pos(2);
13plot_options.width=pos(3);
14plot_options.height=pos(4);
15
16%Figure out tensor type:
17%FIXME does not work anymore
18if strncmpi(type,'strain',6),
19 tensor=md.results.strainrate;
20elseif strncmpi(type,'stress',6),
21 tensor=md.results.stress;
22elseif strncmpi(type,'deviatoricstress',16),
23 tensor=md.results.deviatoricstress;
24else
25 error('plot_tensor error message: unsupported type of tensor');
26end
27
28%Figure out type of plot being requested
29if strncmpi(fliplr(type),fliplr('tensor'),6) | strcmpi(type,'strainrate') | strcmpi(type,'deviatoricstress') | strcmpi(type,'stress'),
30 plot_tensor_components(md,options,width,i,tensor,type,plot_options);
31 return;
32elseif strncmpi(fliplr(type),fliplr('principal'),9),
33 plot_tensor_principal(md,options,width,i,tensor,type,plot_options);
34 return;
35elseif strncmpi(fliplr(type(1:end-1)),fliplr('principalaxis'),13),
36 plot_tensor_principalaxis(md,options,width,i,tensor,type,plot_options);
37 return;
38else
39 error('plot_tensor error message: unsurported type of plot');
40end
Note: See TracBrowser for help on using the repository browser.