Difficult resetting style sheet default for figure axis label

1 vue (au cours des 30 derniers jours)
Doug Leaffer
Doug Leaffer le 23 Fév 2023
Commenté : Simon Chan le 24 Fév 2023
How can I reset the style sheet default to make the figure left y-axis label (missing here, but appears in a full screen window in MATLAB) and values to appear in a minimized window and/or in print preview? I do not want to decrese the axes font size. I cannot attach the .fig file

Réponse acceptée

Simon Chan
Simon Chan le 24 Fév 2023
Try to force the OuterPosition of the axis to 0, and at the same time the size of the plotting area may be smaller.
ax = gca; % Provided ax is the current axis handle
ax.OuterPosition(1)=0; % Force the starting OuterPosition to 0
  2 commentaires
Doug Leaffer
Doug Leaffer le 24 Fév 2023
Thank you Simon. That is good workaround. When executed, the right color bar axes label (dB/Hz) now disappears from the minmized window. I can manually add a text box lable and move it slightly left to appear.
Simon Chan
Simon Chan le 24 Fév 2023
Sorry I overlooked your figure has colorbar on the right side.
In that case, you may retrieve the colorbar Position from its handle and force the width of the axis position to the beginning of the colorbar starting position as follows. Of course, the size of the plotting area will be further reduced.
ax = gca; % Provided ax is the current axis handle
ax.OuterPosition(1)=0; % Force the starting OuterPosition to 0
cb = colorbar(ax);
ax.OuterPosition(3)=cb.Position(1)+ cb.Position(3);

Connectez-vous pour commenter.

Plus de réponses (0)

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by