how to create one plot with several contours (corner plot)

5 次查看(过去 30 天)
I have contours created by several matrices.
I need to arrange them in that manner:
How can I do so? (of course I already have the matrices and each contour seperatley )

回答(1 个)

Adam Danz
Adam Danz 2022-4-8
As KSSV recommended, tiledlayout is the way to go.
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
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.
Tal Shavit
Tal Shavit 2022-4-9
amazing!
I still didn't figure which numbers to exactly give, but im playing with that
thank you so much' you have helped me alot

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Contour Plots 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by