Skip to content

SVGraph_SetAxes()

CapnOdin edited this page Jan 11, 2018 · 6 revisions

Sets the ranges of the axes.

SVGraph_SetAxes([xmin, xmax, ymin, ymax, Boxed])

Parameters

xmin

The left most value of the x-axis.

Note: If left blank the value will remain unchanged.

xmax

The right most value of the x-axis.

Note: If left blank the value will remain unchanged.

ymin

The left most value of the y-axis.

Note: If left blank the value will remain unchanged.

ymax

The right most value of the y-axis.

Note: If left blank the value will remain unchanged.

Boxed

A boolean determining whether or not to force the axes to intersect in the bottom left corner.

Note: If left blank the value will remain unchanged.

Remarks

If zero is within the range of either axis, the axes will intersect at this point.

The axes will intersect in the middle if not for the above or if the parameter Boxed is not True.

Example

; Plot Sinus from -10 to 10
Gui, Add, ActiveX, vIE, Shell.Explorer
SVGraph_Attach(IE)
SVGraph_Start()
SVGraph_Chart(700, 365, 40)
SVGraph_SetAxes(-10, 10, -1, 1)
SVGraph_LinePlot("x", "Math.sin(x)", "#0000FF", 200)

Plot Sinus Normal

; Turn the above plot on its head
Gui, Add, ActiveX, vIE, Shell.Explorer
SVGraph_Attach(IE)
SVGraph_Start()
SVGraph_Chart(700, 365, 40)
SVGraph_SetAxes(-10, 10, 1, -1)
SVGraph_LinePlot("x", "Math.sin(x)", "#0000FF", 200)

Plot Sinus On Head

; Mirror the first plot
Gui, Add, ActiveX, vIE, Shell.Explorer
SVGraph_Attach(IE)
SVGraph_Start()
SVGraph_Chart(700, 365, 40)
SVGraph_SetAxes(10, -10, -1, 1)
SVGraph_LinePlot("x", "Math.sin(x)", "#0000FF", 200)

Plot Sinus Mirrored