Borrar filtros
Borrar filtros

Add Trendline to gplotmatrix

3 visualizaciones (últimos 30 días)
MustangManiac
MustangManiac el 2 de Ag. de 2018
Editada: MustangManiac el 2 de Ag. de 2018
How can I add basic trendlines to a gplotmatrix? I compile a large amount of data ending up in a 10x10 scatter plot matrix and I'd like each of those to have a trendline.
if true
Data_Excel = paste; %Using Copy/Paste tool put
Data=Data_Excel(2:end,1:end); %input data from excel in data array
legend=Data_Excel(1,1:end); %take header files for legend
figure
% Changed to use 'cell2float' function, this allows you to put NAN or blank
% spaces in your data set. Useful if you have outlier data points you don't
% have to hide the whole data set, just delete the specific outlier data
% variable
[h,ax,BigAx]=gplotmatrix(cell2float(Data),[],cell2float(Data(:,1)),distinguishable_colors(25),'xxxxxxx',4, ...
'on','variable',regexprep(legend,'_',' '),regexprep(legend,'_',' ')'); %Plot a series of scatter plots, plots will be generated based on number of Excel columun headers were used
end

Respuestas (0)

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by