textP

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Analytical Geometry
Introduced first in SolidGeometry 3.4, Creation date: 2017-02-07, Last change: 2025-09-14

draws a texlabel text at the position



See Also: textT , textVL , textCVL , textVLFL , VLFLfaceNormalplot

Example Illustration

 missing image of textP(p,str,delx,dely,Fnts)

Syntax

h=textP(p,str,[delx,dely,Fnts])

Input Parameter

p: point
str: texlabel
delx: displacement x; default is 0.02 (2%)
dely: displacement y; default is 0.02 (2%)
Fnts: Fontsize; default is 16

Output Parameter

h: handle to text




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, textP, is designed to place a text label at a specified point in a plot, with optional displacement and font size adjustments. It is part of the SolidGeometry library.

Input Parameters

Output

Algorithm Steps

  1. Retrieve the current axis limits using the axis function.
  2. Set default values for delx, dely, and Fnts if they are not provided in varargin.
  3. Calculate the displacement in the x and y directions based on the axis limits and the specified or default displacements.
  4. Check if the point p is empty. If it is, return an empty handle.
  5. If p is a 2D point, append a zero to make it a 3D point.
  6. Create a text object at the displaced position using the text function, with the specified font size and color.
Algorithm explaination created using ChatGPT on 2025-08-19 00:28. (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