Add Trendline to gplotmatrix
2 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!