Effacer les filtres
Effacer les filtres

How to set "TightInset" globally?

27 vues (au cours des 30 derniers jours)
William Greenway
William Greenway le 14 Mar 2022
I'm trying to set up a MATLAB script that needs to print multiple figures. I want to set up the settings globally so that I don't have to paste the code each time. How do I set up "TightInset" globally so that I don't have to paste it each time. At the moment I have been using:
set(gca,'LooseInset', max(get(gca,'TightInset'), 0.02))
But want this to be set globally similar to
set(0, 'defaultFigureUnits', 'inches', 'defaultFigurePosition', [0 0 3.5 3]);

Réponses (1)

Walter Roberson
Walter Roberson le 14 Mar 2022
You cannot control TightInset: it is read-only.
You can set a default LooseInset though.
set(groot, 'defaultAxesLooseInset', [0.04 0.05 0.02 0.02])
  1 commentaire
William Greenway
William Greenway le 14 Mar 2022
Thanks very much! What's the difference between using
set(groot,...)
and
set(0,...)
???
Thanks!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Discrete Data Plots dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by