Hi there,
I have an N x M table and I am trying to create M histograms on different plots, I can't seem to figure out how to plot them on different figures. If I hold on, they all plot on the same axis'
data = readtable('file.csv'); % Import in wine raw data
predictors = data(:,1:width(data)-1); % remove quality as it is our output
headers = predictors.Properties.VariableNames; % Get predictor labels
%% Lets check to see how our predictors are distributed
statarray = grpstats(predictors,[],{'mean','std'})for k = width(headers); a = table2array(predictors(:,k)); % Converting from table to array for hist
histogram(a) title(headers(1,k))end
I'm also not sure why I can't pass a table row to a histogram and need to table2array the data.
Any help would be greatly appreciated. Thank you
Best Answer