getframeaxis

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

same as frameaxis but also stores the axis information



See Also: , implot

Example Illustration

 missing image of getframeaxis(ax)

Syntax

I=getframeaxis([ax])

Input Parameter

ax: default is gca

Output Parameter

I: Image struct as of getframe

Examples


SGbox; view(0,90); I=getframeaxis(gca); figure(123); implot(I); axis equal;




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, getframeaxis, is designed to capture the current figure or a specified axis in MATLAB, similar to the built-in getframe function, but with additional axis information.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the axis parameter using getfuncparams. If no axis is provided, use the current axis (gca).
  2. Capture the frame of the specified axis using getframe.
  3. Store the current axis limits in the output structure I using axis.
  4. Retrieve additional transformation information using Tofgca and store it in I.Tt.

Example Usage

The function can be used as follows:

SGbox; 
view(0,90); 
I=getframeaxis(gca); 
figure(123); 
implot(I); 
axis equal;

This example demonstrates capturing the current axis and displaying it in a new figure with equal axis scaling.

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