Syntax
view4all([AZ,EL])
Input Parameter
AZ : | | azimut angle; default is AZ of gca |
EL : | | elevation angle; default is EL of gca |
Examples
A=SGbox([5,5,5]); B=SGbox(20,30,10); SG={A,B}; SGplotcellmultiple(SG);
view(-40,9);
view4all % use AZ,EL of last gca
view4all(0,90) % set all AZ and EL to [0,90]
Copyright 2022-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This function, view4all
, is designed to set the view angles for all subplots within a figure to the same azimuth and elevation angles. It is part of a set of functions that modify all subplots of a figure, introduced in SolidGeometry 5.2.
Input Parameters
- AZ: Azimuth angle. If not provided, it defaults to the azimuth angle of the current axes (
gca
).
- EL: Elevation angle. If not provided, it defaults to the elevation angle of the current axes (
gca
).
Algorithm Steps
- Retrieve the azimuth (
AZ
) and elevation (EL
) angles from the input parameters using the getfuncparams
function. If not provided, they are set to empty arrays.
- Get the current axes handle using
gca
and store it in hh
.
- Retrieve the current view angles of the current axes using the
view
function, storing them in az
and el
.
- If
AZ
is empty, set it to the current azimuth angle az
.
- If
EL
is empty, set it to the current elevation angle el
.
- Find all axes objects within the current figure using
findobj
and store them in subs
.
- Iterate over each axes object in
subs
:
- Set the current axes to the current subplot using
axes(subs(i))
.
- Set the view of the current subplot to the specified
AZ
and EL
using view(AZ,EL)
.
- Finally, reset the current axes to the original axes stored in
hh
.
Algorithm explaination created using ChatGPT on 2025-08-18 23:19. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21