function [hSF,hCon,hEVM] = vhtTxSetupPlots(cfgVHT)
%vhtTxSetupPlots Create measurement plots for
%VHTTransmitterMeasurementsExample featured example

% Copyright 2015-2018 The MathWorks, Inc.

% Scale and position plots on the screen
[repositionPlots,position] = helperPlotPositions();

% Spectral flatness diagram
hSF = figure; 
title('Spectral Flatness, Packet: 1');
grid('on');
hSF.Visible = 'Off';
if repositionPlots
    hSF.Position = position(1,:);
end

% Number of spatial streams
numSS = cfgVHT.NumSpaceTimeStreams/(double(cfgVHT.STBC)+1);

% Reference constellation symbols
refConst = wlanReferenceSymbols(cfgVHT);

% Constellation diagram and EVM per subcarrier plot for each spatial stream
hCon = cell(numSS,1);
hEVM = cell(numSS,1);
for i = 1:numSS
    % Constellation diagram per spatial stream
    hCon{i} = comm.ConstellationDiagram;
    hCon{i}.ReferenceConstellation = refConst;
    hCon{i}.Title = 'Equalized Data Symbols, Packet:1, Spatial Stream:1';
    
    % EVM per subcarrier per spatial stream
    hEVM{i} = figure;
    title('RMS EVM, Packet:1, Spatial Stream:1');
    grid('on');
    hEVM{i}.Visible = 'Off';
    if repositionPlots
        hCon{i}.Position = position(2,:);
        hEVM{i}.Position = position(4,:);
    end
end

end

