% XY graph of property values
function XYPlotProp(req, propName)

    % Retrieve first entity's property data array
    for prp = req.entities(1).props

        % Check for matching name
        if prp.name == propName

            % Values for data or estimate
            if( prp.status == "Active" )
                name = "Data Values";
                spec = "squareb";
            else
                name = "Estimates";
                spec = "-";
            end

            % Generate graph
            x = [prp.data.tempValue];
            y = [prp.data.value];
            plot(x,y, spec, 'DisplayName', name)
            hold on

            % Units, assuming all are same
            vunits = prp.data(1).valueUnits;
            tunits = prp.data(1).tempUnits;
            vunits = FormatUnits(vunits);
            tunits = FormatUnits(tunits);
        
            % Modify graph axes
            xlabel("Temperature" + tunits)
            ylabel(prp.name + vunits)

            % Assign graph title
            title("MKS Property Values")

        end
    end

    % Format units
    function units = FormatUnits(units)

        % Append prefix and suffix terms
        units = " [" + units + "]";
    
    end

    % Finalize plot
    legend("Location", "northwest")
    fontsize(16, "points")
    grid on

    % Reset plot options
    hold off

end