Filter löschen
Filter löschen

Difficult resetting style sheet default for figure axis label

3 Ansichten (letzte 30 Tage)
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

Akzeptierte Antwort

Simon Chan
Simon Chan am 24 Feb. 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 Kommentare
Doug Leaffer
Doug Leaffer am 24 Feb. 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 am 24 Feb. 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);

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by