ScalingOptions

ScalingOptions ( axisIndex ;​ doReverseScaling ;​ useIntegersOnly ;​ hideZeroLabel )

Argument Type Range Default Note
axisIndex int 0..10000 all
doReverseScaling int 0..1 off
useIntegersOnly int 0..1 off
hideZeroLabel int 0..1 off
Examples
Description

By activating the 2nd argument doReverseScaling = on, the direction of the scaling can be reversed, i.e. the scaling of the x-axis no longer increases from left to right, but the other way around, from right to left; the y-axis correspondingly increases from top to bottom. For polar and radar charts the argument doReverseScaling is ignored.

SCALING_OPTIONS_01
1

OpenDrawing(250;​150)

2

ChartData(30 18 18 14 13 8 5)

3

BarChart(label;​0)

4

/* Set up styles. */

5

FillStyle(1;​#4682b420)

6

BorderStyle(1;​;​1;​#4682b4)

7

/* Set up axes. */

8

ScalingOptions(y;​on) /* y-scale top to bottom. */

9

AxisOptions(x;​none) /* Hide x-axis. */

10

AxisLine(y;​0)

11

AxisMajorTicks(y;​5;​1;​#333;​;​out)

12

/* Set up grid. */

13

GridLocation(all;​none) /* Hide grid. */

14

CloseDrawing()

SCALING_OPTIONS_01
SCALING_OPTIONS_02
1

OpenDrawing(250;​150)

2

ChartData(30 18 18 14 13 8 5)

3

BarChart(horizontal+label;​0)

4

/* Set up styles. */

5

FillStyle(1;​#4682b420)

6

BorderStyle(1;​;​1;​#4682b4)

7

/* Set up axes. */

8

ScalingOptions(all;​on) /* Reverse scales. */

9

AxisOptions(all;​none) /* Hide axes. */

10

/* Set up grid. */

11

GridLocation(all;​none) /* Hide grid. */

12

CloseDrawing()

SCALING_OPTIONS_02

By activating the 3rd argument useIntegersOnly = on, scaling values which are not whole numbers can be suppressed. This proves useful when depicting integral values, e.g. for frequency distributions. Example with useIntegersOnly = off:

SCALING_OPTIONS_03
1

OpenDrawing(250;​150)

2

ChartData(1 9 0 9 5 5 7 8)

3

Histogram(horizontal)

4

HistogramOptions(on) /* After Histogram() */

5

/* Set up styles. */

6

FillStyle(1;​#4682b420)

7

BorderStyle(1;​;​1;​#4682b4)

8

/* Set up axes. */

9

ScalingOptions(x;​;​off)

10

ScalingOptions(y;​on) /* y-scale top to bottom. */

11

AxisLine(all;​0) /* Hide axis lines. */

12

AxisMajorTicks(all;​0) /* Hide tick marks. */

13

/* Set up grid. */

14

MajorGridLineWidths(x;​y;​0)

15

MajorGridLineWidths(y;​x;​0.25)

16

CloseDrawing()

SCALING_OPTIONS_03

Example with useIntegersOnly = on:

SCALING_OPTIONS_04
1

OpenDrawing(250;​150)

2

ChartData(1 9 0 9 5 5 7 8)

3

Histogram(horizontal)

4

HistogramOptions(on) /* After Histogram() */

5

/* Set up styles. */

6

FillStyle(1;​#4682b420)

7

BorderStyle(1;​;​1;​#4682b4)

8

/* Set up axes. */

9

ScalingOptions(x;​;​on) /* Integers only. */

10

ScalingOptions(y;​on) /* y-scale top to bottom. */

11

AxisLine(all;​0) /* Hide axis lines. */

12

AxisMajorTicks(all;​0) /* Hide tick marks. */

13

/* Set up grid. */

14

MajorGridLineWidths(x;​y;​0)

15

MajorGridLineWidths(y;​x;​0.25)

16

CloseDrawing()

SCALING_OPTIONS_04

If the 4th argument hideZeroLabel = on is set, the scaling label for the value 0 is hidden. Sometimes this has proven to be advantageous when the scaling labels are very close to each other at the point where the x and y-axis intersect.

SCALING_OPTIONS_05
1

OpenDrawing(250;​150)

2

SetThousandsSep(",")

3

ChartData(2870000 1850000 1420000 1810000)

4

AreaChart(symbol)

5

AreaChartOptions(on) /* After AreaChart() */

6

/* Set up styles. */

7

FillStyle(1;​#4682b420)

8

BorderStyle(1;​poly;​0)

9

LineStyle(1;​;​2;​#4682b4)

10

SymbolStyle(1;​circle;​6;​1;​#4682b4;​;​white)

11

/* Set up axes. */

12

Scaling(y;​linear;​0;​3000000;​6)

13

ScalingOptions(y;​;​;​on) /* Hide "0" */

14

AxisLine(all;​0) /* Hide axis lines. */

15

AxisMajorTicks(all;​0) /* Hide tick marks. */

16

AxisMajorTickLabelTexts(x;​"Item 1";​"Item 2";​"Item 3";​"Item 4")

17

/* Set up grid. */

18

MajorGridLineWidths(all;​all;​0.25)

19

CloseDrawing()

SCALING_OPTIONS_05
Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×