Add Trendline to gplotmatrix
조회 수: 3 (최근 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!