VMcaxis

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - VM/Voxels
Introduced first in SolidGeometry 3.8, Creation date: 2017-04-12, Last change: 2025-09-14

adjustes the caxis of the VMplot diagram



See Also: VMplot , VMwindowplot

Example Illustration

 missing image of VMcaxis(cax)

Syntax

cax=VMcaxis([cax])

Input Parameter

cax: [cmin cmax]; default is min and max of the current! surfaces

Output Parameter

cax: selected Values if called without input paramter

Examples


VMplot(VM)
VMcaxis




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, VMcaxis, is designed to adjust the color axis limits of a VMplot diagram. It is part of the SolidGeometry library and was introduced in version 3.8. The function can be used to set the color axis limits based on the current surfaces in the plot or based on user-specified limits.

Input Parameters

Output Results

Algorithm Steps

  1. Initialize cax as an empty array. If an input parameter is provided and is not empty, set cax to this input value.
  2. Declare two global variables: VMcax and VMplothandle.
  3. Activate the figure associated with VMplothandle.
  4. Initialize cmin to positive infinity and cmax to negative infinity.
  5. Select the first subplot (2,2,1) and find all surface objects in the current figure.
  6. Retrieve the color data (Cdata) from these surface objects.
  7. Iterate over the color data to find the minimum and maximum values across all surfaces, updating cmin and cmax accordingly.
  8. If cax is empty, set it to [cmin cmax].
  9. Apply the color limits cax to the subplots (2,2,1), (2,2,2), and (2,2,4) using the clim function.
  10. Assign the final cax value to the global variable VMcax.
Algorithm explaination created using ChatGPT on 2025-08-18 23:48. (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