by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-28, Last change: 2025-09-15
See Also: axisscale
, view4all
axis4all([fig,axisparams])
fig: | default is gcf; no need to use it as first paramter | |
axisparams: | list of parameters same as for axis |
close all
SGsample; % or SGfigure; SGplot4(SGbox)
axisscale
axis4all('on','tight'); drawnow
axis4all(gcf, 'off'); drawnow
This algorithm is a MATLAB function named axis4all that applies axis settings to all subplots within a specified figure. It is part of the SolidGeometry library and was introduced in version 5.2.
gcf) is used by default.axis function in MATLAB. These parameters define the axis settings to be applied.getfuncparams to retrieve the first parameter from varargin, defaulting to gcf if not specified.fig is a valid handle using ishandle. If it is not, fig is set to gcf.findobj with the 'Type','Axes' filter.axisparams using the axis function.The function can be used in a script as follows:
close all
SGsample; % or SGfigure; SGplot4(SGbox)
axisscale
axis4all('on','tight'); drawnow
axis4all(gcf, 'off'); drawnow
In this example, the function is used to apply axis settings to all subplots in the current figure, first setting them to 'on' and 'tight', and then turning them 'off'.
Algorithm explaination created using ChatGPT on 2025-08-18 23:40. (Please note: No guarantee for the correctness of this explanation)