function mphgeom(m,name,varargin)
% MPHGEOM Plot a geometry in a MATLAB figure
%  
%   MPHGEOM(MODEL,GEOMNAME) creates a MATLAB plot of the geometry GEOMNAME.
% 
%   MPHGEOM(MODEL,GEOM,...) creates a MATLAB plot of the geometry GEOMNAME 
%   with the figure properties given below.
% 
%   Valid properties include:
%   Property           Value/{Default}     Description
%   -----------------------------------------------------------------------
%   Parent             Double              Parent axis
%   Selection          Vector | {[]}       Selection
%   Entity             'point' | 'edge' |  Geometric entity to select
%                      'boundary' | 
%                      'domain'
%   Build              {'on'} | 'off' |    Build the geometry
%                      'current'				   
%   Edgecolor          char {'k'}          Edge color
%   Edgelabels         'on'|{'off'}        Show edge labels
%   Edgelabelscolor    char {'g'}          Color for edge labels
%   Edgemode           {'on'}|'off'        Show edges
%   Facealpha          Double {1}          Use transparency
%   Facelabels         'on'|{'off'}        Show face labels
%   Facelabelscolor    char|{'b'}          Color for face labels
%   Facemode           {'on'}|'off'        Show faces
%   Vertexlabels       'on'|{'off'}        Show vertex labels
%   Vertexlabelscolor  char|{'r'}          Color for vertex labels
%   Vertexmode         'on'|{'off'}        Show vertices
% 
%   Example:
%     % Load shell_diffusion.mph from the Model Library:
%     model=mphload('shell_diffusion.mph');
%     % Plot the geometry geom1:
%     mphgeom(model,'geom1')
% 
%     % Create a plot of the geometry in a subplot:
%     ax = subplot(1,2,1);
%     mphgeom(model, 'geom1', ...
%        'parent', ax, ...
%        'edgecolor', 'k', ...
%        'edgelabels', 'on', ...
%        'facealpha', 0.5,...
%        'edgelabelscolor', 'b', ...
%        'vertexmode', 'on',...
%        'edgemode', 'on');
%     ax = subplot(1,2,2);
%     mphmesh(model, 'mesh1', ...
%        'parent', ax);
% 
%     % Load busbar.mph from the Model Library:
%     model = mphload('busbar')
%     % Plot boundary number 10 using a red color:
%     mphgeom(model, 'geom1', 'selection', 10, 'entity', 'boundary', ...
%        'facecolor', [1 0 0])
%     % Plot boundary 1 to 9 as transparent faces:
%     hold on
%     mphgeom(model, 'geom1', 'selection', 1:9, 'entity', 'boundary', ...
%        'facecolor', [0.5 0.5 0.5], 'facealpha', 0.5)

% Copyright 2010-2011 COMSOL
