Skip to content

SVGraph_SetGrid()

CapnOdin edited this page Jan 11, 2018 · 7 revisions

Sets Ticks and Grid.

SVGraph_SetGrid([xory, Major, Minor, Colour, DashArray])

Parameters

xory

A string determining along which axis to set the grid.

To set along the x-axis use "x" for the y-axis used "y".

Note: If left blank the grid will be set along both axes.

Major

An approximate number of ticks.

Alternatively: To set specific ticks, this parameter can be set to a string formatted as an array. e.g. "[-5,0,5]" will result in tree ticks.

Note: If left blank the value will remain unchanged.

Minor

The number of grid lines between each pair of ticks.

Note: If left blank the value will remain unchanged.

Colour

The colour of the grid lines, supports HTML Color Names or Color Values. e.g. "lightgrey" or "#FF00FF".

Note: If left blank the value will remain unchanged.

DashArray

A comma separated string that determines the look of the grid lines.

  • "0": "0"
  • "5": "5"
  • "5,1": "5,1"
  • "5,1,5": "5,1,5"

Note: If left blank the value will remain unchanged.

Remarks

Ticks will always have grid lines.

Example

; Sets the grid lines along the x-axis to be red
; and to have one grid line between each pair of ticks
Gui, Add, ActiveX, vIE, Shell.Explorer
SVGraph_Attach(IE)
SVGraph_Start()
SVGraph_Chart(700, 365, 40)
SVGraph_SetAxes(-10, 10, -1, 1)
SVGraph_SetGrid("x", , 1, "#FF0000")

Grid