patchofgca
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 3.8, Creation date: 2017-04-19, Last change: 2025-09-14
returns the handle to all patches of the current graphics axis
Description
simple macro: h=findall(gh,'type','patch');
Different to VLFLofgca
See Also: SGofpatch
, patchofSG
, SGplot
Example Illustration
Syntax
h=patchofgca([gh])
Input Parameter
gh: | | gca or gcf; default gca |
Output Parameter
Examples
patchofgca
Copyright 2017-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, patchofgca, is designed to return the handle to all patch objects within a specified graphics axis in MATLAB. It is part of the SG-Library and was created by Tim Lueth in 2017.
Input Parameters
- gh: This parameter can be either the current axes (
gca) or the current figure (gcf). If no input is provided, the default is gca.
Output Results
- h: This is the handle or an array of handles to all patch objects found within the specified graphics axis.
Algorithm Steps
- Initialize
gh to gca by default.
- Check if there is at least one input argument and if it is not empty. If so, set
gh to the provided input argument.
- Use the
findall function to locate all objects of type 'patch' within the specified graphics handle gh.
- Return the handles to these patch objects as the output
h.
Example Usage
To use this function, simply call patchofgca without any arguments to get the patch handles of the current axes:
patchofgca
This function is useful for identifying and manipulating patch objects within a MATLAB figure or axes, which are often used for creating filled polygons or other complex shapes in graphical plots.
Algorithm explaination created using ChatGPT on 2025-08-18 22:41. (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