pixelpositionofP
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 3.4, Creation date: 2017-02-06, Last change: 2025-09-14
returns the pixelposition of a point coordinate
Description
If uipanels or uicontrols should be placed at point coordinates, the position of a point coordinate relative to the figure is requested.
It does not work correctly yet for axis equal;
Panels are moved correctly, but not fixed pixel positions
See Also: , select3d
, pixelofaxis
Example Illustration
Syntax
[pf,ppf,ppa]=pixelpositionofP(p)
Input Parameter
p: | | point coordinate [x y] |
Output Parameter
pf: | | pixel coordinate in figure (uicontrol) |
ppf: | | pixel coordinate in percentage of figure (uipanel) |
ppa: | | pixel coordinate in percentage of axis |
Examples
set a uipanel at 0.8 0.1
figure; axis on; grid on; axis equal
pixelpositionofP([0.8 0.1])
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
Last html export of this page out of FM database by TL: 2025-09-21