Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
cnrvx732
cnrvx732 le 3 Avr 2021
Modifié(e) : Matt J le 3 Avr 2021
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?

Réponse acceptée

Matt J
Matt J le 3 Avr 2021
Modifié(e) : Matt J le 3 Avr 2021
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];

Plus de réponses (1)

KALYAN ACHARJYA
KALYAN ACHARJYA le 3 Avr 2021
Modifié(e) : KALYAN ACHARJYA le 3 Avr 2021
One way to plot multiple subplots with diffeent aspect size: tiledlayout function

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by