CPLplotcolors

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CPL/Closed Polygon Lists
Introduced first in SolidGeometry 4.3, Creation date: 2018-10-18, Last change: 2025-09-14

plots all contours or indexed contours in colors



See Also: CPLplotasPS , CPLplot , CPLfaceplot , CPLplotregions , CPLplotinout , CPLplotcwccw

Example Illustration

 missing image of CPLplotcolors(CPL,ind,fs)

Syntax

h=CPLplotcolors(CPL,[ind,fs])

Input Parameter

CPL: Closed Polygon line
ind: indizes; default is all
fs: optional font size

Output Parameter

h: handle to graphics objects

Examples


SGfigure; CPLplotcolors(CPLsample(12));
SGfigure; CPLplotcolors(CPLsample(12),'',16);




Copyright 2018-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, CPLplotcolors, is designed to plot closed polygon lines (CPL) with different colors. It is part of the SolidGeometry library and was introduced in version 4.3. The function takes in a CPL and optional parameters to customize the plot.

Input Parameters

Output

Algorithm Steps

  1. Initialize an empty array h to store graphics handles.
  2. Retrieve the font size fs from the input parameters, defaulting to an empty array if not provided.
  3. Retrieve the color line style cl from the input parameters, defaulting to 'r-' (red line) if not provided.
  4. Determine the indices ind of the polygons to plot. If not specified, use all polygons by default.
  5. Iterate over each index in ind:

The function is designed to provide a visual representation of closed polygon lines with customizable colors and optional text annotations, making it useful for graphical analysis and presentations.

Algorithm explaination created using ChatGPT on 2025-08-19 01:03. (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