plot_boundaries

PURPOSE ^

PLOT_BOUNDARIES - plot mesh boundaries

SYNOPSIS ^

function plot_boundaries(md,options_structure,width,i);

DESCRIPTION ^

PLOT_BOUNDARIES - plot mesh boundaries

   Usage:
      plot_boundaries(md,options_structure,width,i);

   See also: PLOTMODEL

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function plot_boundaries(md,options_structure,width,i);
0002 %PLOT_BOUNDARIES - plot mesh boundaries
0003 %
0004 %   Usage:
0005 %      plot_boundaries(md,options_structure,width,i);
0006 %
0007 %   See also: PLOTMODEL
0008 
0009 subplot(width,width,i); 
0010 
0011 %process data and model
0012 if ~isnan(options_structure.layer)
0013     disp('plotmodel warning: layer projection not supported yet by plot_boundaries');
0014     options_structure.layer=NaN;
0015 end
0016 [x y z elements is2d]=processmesh(md,options_structure);
0017 
0018 for i=1:size(md.segments,1),
0019     plot(x(md.segments(i,1:2)),y(md.segments(i,1:2)),'k.-');hold on;
0020 end
0021 
0022 %plot rifts if present:
0023 if isstruct(md.rifts),
0024     for i=1:size(md.rifts,1),
0025         segments=md.rifts(i).segments;
0026         for j=1:size(segments,1),
0027             plot(x(segments(j,1:2)),y(segments(j,1:2)),'r.-');
0028         end
0029         text(x(segments(floor(size(segments,1)/4),1)),y(segments(floor(size(segments,1)/4),1)),['Rift #' num2str(i)]);
0030         %point out the tips
0031         plot(x(md.rifts(i).tips(1)),y(md.rifts(i).tips(1)),'b*');
0032         plot(x(md.rifts(i).tips(2)),y(md.rifts(i).tips(2)),'b*');
0033     end
0034 end
0035 
0036 %apply options
0037 if isnan(options_structure.title)
0038     options_structure.title='Mesh boundaries';
0039 end
0040 if isnan(options_structure.colorbar)
0041     options_structure.colorbar=0;
0042 end
0043 applyoptions(md,[],options_structure);

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003