how to create one plot with several contours (corner plot)
조회 수: 8 (최근 30일)
이전 댓글 표시
I have contours created by several matrices.
I need to arrange them in that manner:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/957180/image.png)
How can I do so? (of course I already have the matrices and each contour seperatley )
답변 (1개)
Adam Danz
2022년 4월 8일
tcl = tiledlayout(3,3,'TileSpacing','none');
tileIdx = [1,4,5,7,8,9]; % row-wise index of tiles
ax = gobjects(size(tileIdx));
for i = 1:numel(tileIdx)
ax(i) = nexttile(tcl,tileIdx(i));
contour(ax(i), magic(8))
end
% equate axis ranges and turn off tick labels for inner axes
linkaxes(ax)
set(ax(3),'YTickLabel',[],'XTickLabel',[])
set(ax(5:6),'YTickLabel',[])
댓글 수: 7
Adam Danz
2022년 4월 8일
It looks like you didn't include the lines at the bottom of my answer using linkaxes and the two set commands.
linkaxes will link all of the axes limits and tick. The two set commands will eliminate the axis tick labels in the inner tiles.
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!