view4all

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.2, Creation date: 2022-04-23, Last change: 2025-09-15

sets the view angles for all subplots the same

Description

This a function of a set of functions the modify all subplots of a figure

See Also: axisscale , SGplotcellmultiple

Example Illustration

 missing image of view4all(AZ,EL)

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

Algorithm Steps

  1. 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.
  2. Get the current axes handle using gca and store it in hh.
  3. Retrieve the current view angles of the current axes using the view function, storing them in az and el.
  4. If AZ is empty, set it to the current azimuth angle az.
  5. If EL is empty, set it to the current elevation angle el.
  6. Find all axes objects within the current figure using findobj and store them in subs.
  7. Iterate over each axes object in subs:
  8. 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