%% Specify Scatter Histogram Chart Appearance
% Create a scatter plot with marginal histograms. Specify the number of bins and line widths of the histograms, the location of the scatter plot, and the legend visibility.
% Load the patients data set and create a scatter histogram chart from the data. Compare the patients' Diastolic and Systolic values, and group the data according to the patients' SelfAssessedHealthStatus values. Adjust the histograms by specifying the NumBins and LineWidth options. Place the scatter plot in the 'NorthEast' location of the figure by using the ScatterPlotLocation option. Ensure the legend is visible by specifying the LegendVisible option as 'on'.

load patients
tbl = table(LastName,Diastolic,Systolic,SelfAssessedHealthStatus);
s = scatterhistogram(tbl,'Diastolic','Systolic','GroupVariable','SelfAssessedHealthStatus', ...
    'NumBins',4,'LineWidth',1.5,'ScatterPlotLocation','NorthEast','LegendVisible','on');

% Copyright 2018 The MathWorks, Inc.