zoomsubplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 5.2, Creation date: 2022-03-31, Last change: 2025-08-18

opens a figure and zooms the subplot image



See Also: copyfig

Example Illustration

 missing image of zoomsubplot

Syntax

zoomsubplot

Examples


SGsample(3:12); % Click into one subplot
zoomsubplot




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, zoomsubplot, is designed to enhance the visualization of a subplot by opening it in a new figure window and enabling 3D rotation. Below is a detailed explanation of the algorithm and its parameters:

Input Parameters

The function zoomsubplot does not take any input parameters directly. It operates on the current subplot selected by the user.

Algorithm Steps

  1. Select Subplot: The function begins by calling selectsubplot, which allows the user to select a subplot interactively. This function returns the handle to the selected subplot, stored in the variable ax.
  2. Get Current View: The function retrieves the current azimuth and elevation angles of the view using the view function. These angles are stored in aw and ew respectively.
  3. Get Solid Geometry: The function SGofgca is called with the selected subplot handle ax to obtain the solid geometry data associated with the current axes. This data is stored in the variable SG.
  4. Create New Figure: A new figure window is opened with the identifier 111. The cla function is called to clear the current axes in this new figure.
  5. Plot Geometry: The function SGTplotalpha is called with the solid geometry data SG to plot the geometry in the new figure.
  6. Set View: The view of the new figure is set to the previously stored azimuth and elevation angles aw and ew using the view function.
  7. Enable 3D Rotation: The rotate3d on command is executed to enable interactive 3D rotation of the plot in the new figure.
  8. Show Figure: The shg command is used to bring the new figure window to the front, making it visible to the user.

Output

The function does not return any output. It modifies the graphical display by opening a new figure window with the selected subplot, allowing for enhanced visualization and interaction.

Algorithm explaination created using ChatGPT on 2025-08-18 21:52. (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