function varargout = smithplot(varargin)
    %SMITHPLOT Plot of measurement data on a smith chart.
    %  smithplot plots measurement data on a smith chart.
    %
    %  smithplot(D) creates a smith chart based on values in
    %  vector D.
    %
    %  For a matrix D, columns of D are independent datasets. For N-D
    %  arrays, dimensions 2 and greater are independent datasets.
    %
    %  smithplot(F1,D1,F2,D2, ...) specifies frequency vectors F1, F2, ...
    %  along with data matrices D1, D2, ...  More information
    %  about data formats is available using <a href="matlab:help rf.internal.smithplot/formats">help rf.internal.smithplot/formats</a>.
    %
    %  P = smithplot(___) returns an object that can customize the plot and
    %  add measurements using MATLAB commands. Properties are found by
    %  displaying variable P in the MATLAB command window. For example,
    %  P.GridType = 'ZY' shows the immittance grid.
    %
    %  P = smithplot('gco') returns object P from the smithplot plot
    %  in the current figure, useful when P was not returned or retained.
    %
    %  Additional traces can be added to the plot using add(P,...) using
    %  any data input format shown above.  Existing traces can be replaced
    %  using replace(P,...).
    %
    %  smithplot(H,___) where H is an axes handle is supported. Axes handle
    %  is currently not supported for objects, use 'Parent' property
    %  instead.
    %
    %  smithplot (hnet,i,j) plots the (i,j)th parameter of hnet. hnet is a
    %  network parameter object, or an rfckt object, or an rfdata object,
    %  or an nport object.
    %
    %  smithplot (hnet,[i1,j1; i2,j2;...]) plots multiple parameters
    %  (i1,j1),(i2,j2),.. of an hnet object.
    %
    %  smithplot (hnet) plots all s-parameters of the hnet object.
    %
    %  smithplot (rfbudgetobj,i,i) plots the reflection co-efficients of
    %  rfbudgetobj, an rfbudget object.
    %
    %  smithplot(___,'P1',V1,'P2',V2, ...) sets the properties 'P1','P2', ...
    %  to values V1,V2, ... when the smithplot object is created.
    %
    %  See also <a href="matlab:help rf.internal.smithplot.formats">formats</a>, <a href="matlab:help rf.internal.smithplot.multiaxes">multiaxes</a>, <a href="matlab:help rf.internal.smithplot.TitleTop">TitleTop</a>,
    %  <a href="matlab:help
    %  rf.internal.smithplot.LegendLabels">LegendLabels</a>, <a
    %  href="matlab:help rf.internal.smithplot.add">add</a>, <a
    %  href="matlab:help rf.internal.smithplot.replace">replace</a>,
    %  matchingnetwork/smithplot

%   Copyright 2017-2019 The MathWorks, Inc.

if nargin > 0
    [varargin{:}] = convertStringsToChars(varargin{:});
end

if nargin==1 && strcmpi(varargin{1},'gco')
    % Find instance in current figure
    p = rf.internal.smithplot.getCurrentPlot;
else
    % Create a new instance
    p = rf.internal.smithplot(varargin{:});
end

% if ~isempty(p)
%     p.LegendVisible = 1;
% end
% c = internal.BannerMessage(p.hFigure);
% c.RemainFor = 10;
% c.Location  = 'top';
% c.String    = 'Right click in the figure window to interact with the plot';
% start(c);
% 
% c.RemainFor = 5;
% c.Location  = 'bottom';
if nargout ~= 0
    varargout{1} = p;
end
