%% Parallel Coordinates Plot with Tabular Data
% Create a parallel coordinates plot from a table of medical patient data.
% Load the patients data set, and create a table from a subset of the variables loaded into the workspace. Create a parallel coordinates plot using the table. The lines in the plot correspond to individual patients. Use the plot to observe trends in the data. For example, the plot indicates that smokers tend to have higher blood pressure values (both diastolic and systolic).

load patients
tbl = table(Diastolic,Smoker,Systolic);
p = parallelplot(tbl)

%
% By default, the software randomly jitters plot lines so that they are unlikely to overlap perfectly along coordinate rulers. This jittering is particularly helpful for visualizing categorical data because it enables you to distinguish between plot lines more easily. For example, observe the plot lines along the Smoker coordinate ruler; the plot lines are not flush with either the true or false tick marks.
% To disable the default jittering, set the Jitter property to 0.

p.Jitter = 0;

% Copyright 2018 The MathWorks, Inc.