ScatterChart2D

ScatterChart2D ( appearanceConst )

Argument Type Range Default Note
appearanceConst int 0..127 default
Description

The ScatterChart2D() function makes it possible to draw 2-dimensional scatter charts. The 1st data series in the ChartData() function provides the x-values, the 2nd data series the y-values for the first symbol series, the 3rd and 4th data series in ChartData() the x and y-values for the second symbol series, etc.

SCATTER_CHART_2D_01
1

OpenDrawing(250;​150)

2

ChartData(25 22 20 25 17 27;​ /* 1st series: x-values. */

3

15 3 10 10 7 8;​ /* 1st series: y-values. */

4

3 10 15;​ /* 2nd series: x-values. */

5

12 5 15) /* 2nd series: y-values. */

6

ScatterChart2D()

7

/* Set up styles. */

8

SymbolStyle(1;​bullet;​6;​1;​#4682b4;​shaded)

9

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

10

/* Set up axes. */

11

AxisLine(all;​0)

12

AxisMajorTicks(all;​0)

13

/* Set up grid. */

14

MajorGridLineWidths(all;​all;​0.25)

15

CloseDrawing()

SCATTER_CHART_2D_01

As for one-dimensional scatter charts, shadow (appearanceConstants = shadow) and labels (appearanceConstants = label) can be added to the symbols by using the argument appearanceConstants. The options can be combined by using a plus sign "+". Rotating (appearanceConstants = horizontal) is not supported for two-dimensional charts as this is simply possible by switching the data series in ChartData() .

SCATTER_CHART_2D_02
1

OpenDrawing(250;​150)

2

ChartData(25 2 20 7 17 27;​ /* 1st series: x-values. */

3

15 3 10 14 7 8;​ /* 1st series: y-values. */

4

23 10 15 12 6;​ /* 2nd series: x-values. */

5

3 10 15 5 4) /* 2nd series: y-values. */

6

ScatterChart2D(shadow)

7

/* Set up styles. */

8

SymbolStyle(1;​spokes5;​10;​1.5;​slateBlue)

9

SymbolStyle(2;​circleHalfLeft;​10;​1;​darkViolet)

10

ShadowStyle(all;​2 2 3)

11

/* Set up axes. */

12

AxisLine(all;​0)

13

AxisMajorTicks(all;​0)

14

/* Set up grid. */

15

MajorGridLineWidths(all;​all;​0.25)

16

GridFrame(xy;​0.5;​#888)

17

CloseDrawing()

SCATTER_CHART_2D_02

As an option, letters or texts can also be used as symbols; this results in a myriad of new "symbols" which can be output with high quality. The letters or texts are defined by the LabelTexts() and LabelStyle() functions. The LabelOptions() function makes it possible to position the texts precisely.

SCATTER_CHART_2D_03
1

OpenDrawing(250;​150)

2

ChartData(25 2 20 7 17 27;​ /* 1st series: x-values. */

3

15 3 10 14 7 8;​ /* 1st series: y-values. */

4

23 10 15 12 6;​ /* 2nd series: x-values. */

5

3 10 15 5 4) /* 2nd series: y-values. */

6

ScatterChart2D(label)

7

/* Set up styles. */

8

SymbolStyle(0;​none)

9

LabelTexts(1;​"M")

10

LabelStyle(1;​Arial;​11;​plain;​slateBlue)

11

LabelOptions(1;​centerCenter;​0;​0)

12

LabelTexts(2;​"F")

13

LabelStyle(2;​Arial;​11;​bold;​teal)

14

LabelOptions(2;​centerCenter;​0;​0)

15

ShadowStyle(all;​2 2 3)

16

/* Set up axes. */

17

AxisLine(all;​0)

18

AxisMajorTicks(all;​0)

19

/* Set up grid. */

20

MajorGridLineWidths(all;​all;​0.25)

21

GridFrame(xy;​0.5;​#888)

22

CloseDrawing()

SCATTER_CHART_2D_03
Scroll to Top