I want to reduce the width of certain plots in a subplot from other plots.

1 次查看(过去 30 天)
By default, all vertically stacked sublots are displayed with the same width, but I would like to narrow the width of a specific plot and center it, is that possible?

采纳的回答

Matt J
Matt J 2021-4-3
编辑:Matt J 2021-4-3
It can be done using the Postion or OuterPosition axes property, e.g.,
for i=1:3
ax(i)=subplot(3,1,i);
plot(rand(1,5));
end
width=0.5;
ax(2).OuterPosition([1,3])=[width/2,width];

更多回答(1 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021-4-3
编辑:KALYAN ACHARJYA 2021-4-3
One way to plot multiple subplots with diffeent aspect size: tiledlayout function

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by