Syntax
[h,lc]=figcopyright([cname])
Input Parameter
cname : | | copyright owner; default is user name |
Output Parameter
h : | | handle to the text |
lc : | | position if text in gca |
Examples
clf; figcopyright; shg
clf; figcopyright(' by Franz Irlinger'); shg
Copyright 2021-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)
The function figcopyright
is designed to add a copyright marker inside the current figure in MATLAB. It is part of the SolidGeometry library and was introduced in version 5.1. The function takes optional input parameters and returns handles to the text and its position.
Input Parameters
- cname: The copyright owner. If not provided, it defaults to the username of the current user.
Output Results
- h: Handle to the text object created.
- lc: Position of the text in the current axes.
Algorithm Steps
- Retrieve the copyright owner name (
cname
) from the input parameters. If not provided, use the current username.
- Convert the username to lowercase and check if it matches 'lueth' or 'timlueth'. If so, and if
cname
is empty, set cname
to 'TL'.
- If
cname
is still empty, set it to the username.
- Get the position and pixel information of the current axis using
pixelofaxis
.
- Format the copyright text using the current year and
cname
.
- If the username is 'lueth' or 'timlueth', calculate the position for the text within the axis limits.
- Create a text object at the calculated position with the formatted copyright text.
- Set the font size of the text using the
fontsize
function.
- Update the figure display with
drawnowvid
.
- If the username is not 'lueth' or 'timlueth', return an empty handle.
Algorithm explaination created using ChatGPT on 2025-08-19 08:30. (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