%% Plot Multiple Variables Using One Y-Axis
% Create a table from a subset of patient data, using the Weight, Systolic, and Diastolic variables.

load patients
tbl = table(Weight,Systolic,Diastolic);
head(tbl,3)

%
% Create a stacked plot, with Systolic and Diastolic plotted using the same y-axis. To plot variables together, specify them within a nested cell array.

vars = {{'Systolic','Diastolic'},'Weight'}

%

stackedplot(tbl,vars)

%
% Copyright 2018 The MathWorks, Inc.