PLplot

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Visualization
Introduced first in SolidGeometry 1.1, Creation date: 2013-12-27, Last change: 2025-09-14

plots a 2D polygon in a 3D figure

Description

PL is a nx2 point list with x/y coordinates

See Also: VLELplots , CPLplot , VLplot , PLplotlineseg

Example Illustration

 missing image of PLplot(PL,c,w,vec,a)

Syntax

h=PLplot(PL,[c,w,vec,a])

Input Parameter

PL: Point list of x/y coordinates nx2
c: Color and symbol of points
w: Width of the used line
vec: if v>0, vectors are plotted from the origin
a: transparancy; default is 0;

Output Parameter

h: Handle to figure

Examples


PLplot(PLcircle(10),'b-',4,'',0.9);




Copyright 2013-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, PLplot, is designed to plot point lists, specifically closed polygon lists, in a 2D space using MATLAB. It is part of the SolidGeometry library.

Input Parameters

Output

Algorithm Steps

  1. Check if the point list PL is empty. If so, return an empty handle.
  2. If PL has three columns, issue a warning suggesting the use of VLplot instead, to avoid faulty drawings.
  3. Set default values for optional parameters c, w, vec, and a. Override these defaults if corresponding arguments are provided.
  4. Ensure the point list PL contains real numbers.
  5. Initialize an empty handle h.
  6. Check the vec parameter:
  7. If a is greater than 0, call CPLfaceplot to add transparency to the plot.
Algorithm explaination created using ChatGPT on 2025-08-19 07: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