Alter axis size
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How do I alter the size of the current axis within a figure? I've tried set(gca,'Position',[.. .. .. ..]), but the axis just disappears.
0 commentaires
Réponse acceptée
Jan
le 2 Oct 2011
Then the part "[.. .. .. ..]" moves the axes out of the visible area of the figure. It would be helpful, if you post the original command instead of masking the interesting part by dots. Try this:
figure('Units', 'pixels', 'Position', [100, 100, 600, 400]);
AxesH = axes;
pause(1);
set(AxesH, 'Units', 'pixels', 'Position', [10, 10, 200, 200]);
pause(1);
set(AxesH, 'Units', 'normalized', 'Position', [0.5, 0.5, 0.4, 0.4]);
Plus de réponses (1)
Grzegorz Knor
le 2 Oct 2011
Try:
set(gca,'Units','normalized','Position',[x y w h])
where x, y, w, h belong to the interval [0 1].
0 commentaires
Voir également
Catégories
En savoir plus sur Annotations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!