Syntax
I=getframeaxis([ax])
Input Parameter
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
- ax: The axis to capture. If not specified, the default is the current axis (
gca
).
Output
- I: An image structure similar to the output of
getframe
, but with additional axis information.
Algorithm Steps
- Retrieve the axis parameter using
getfuncparams
. If no axis is provided, use the current axis (gca
).
- Capture the frame of the specified axis using
getframe
.
- Store the current axis limits in the output structure
I
using axis
.
- 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