hwIViewControl Translate

Moves the axes up, down, left or right based on the given increments.

Syntax

hwIViewControl_handle Translate x, y

Application

HyperGraph Tcl Modify

Description

This command moves the x axis left or right based on the x increment input, and moves the y axis up or down based on the y increment input.

Inputs

x
A value that sets the increment and direction that the x axis moves. A negative value indicates that the axis moves to the right and a positive value indicates a move to the left. The increment then determines how much the axis moves. An x value of 0 indicates that the x axis will not move.
y
A value that sets the increment and direction that the y axis moves. A negative value indicates that the axis moves upward and a positive value indicates that the axis moves downward. The increment then determines how much the axis moves. A y value of 0 indicates that the y axis will not move.

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);
plot Recalculate
plot Draw
w1 GetViewControlHandle vc;
vc Translate 4 0;
plot Draw;

Error

If either the x value, y value, or both are not present, an error message is displayed. Otherwise, a success (0) is returned.

Keywords

HyperWorks

XY Plot

Tcl

Modify