hwIViewControl PickCenter
Makes the given dimensions the center of the plot and changes the axes accordingly.
Syntax
hwIViewControl_handle PickCenterx, y
Application
HyperGraph Tcl Modify
Description
This command makes the given x and y values the center of the plot, and shifts the x axis and y axis accordingly.
Inputs
- x
- The x value that you choose; this value becomes the center of the plot, moving the x axis to make this x value the center.
- y
- The y value that you choose; this value becomes the center of the plot, moving the y axis to make this y value the center.
Example
hwi OpenStack;
hwi GetSessionHandle sess;
sess GetProjectHandle proj;
proj GetPageHandle p1 1;
p1 GetWindowHandle w1 1;
w1 GetClientHandle plot;
plot AddCurve;
plot GetCurveHandle c1 1;
c1 GetVectorHandle x1 x;
x1 SetType Math;
x1 SetExpression (0:10:1);
c1 GetVectorHandle y1 y;
y1 SetType Math;
y1 SetExpression sin(x);
w1 GetViewControlHandle vc;
vc PickCenter 5 0;
plot Draw;
Error
If either the x or y value, or both, are not present, an error message is displayed. Otherwise, a success (0) is returned.
Keywords
HyperWorks
XY Plot
Tcl
Modify