OpenChart

Modified in version 5.0

OpenChart ( left ;​ top ;​ width ;​ height ;​ isPlotArea ;​ clipFlag )

Argument Type Range Default Note
left num -10000..10000 (required) Dimension:[pt]
top num -10000..10000 (required) Dimension:[pt]
width num 1..10000 (required) Dimension:[pt]
height num 1..10000 (required) Dimension:[pt]
isPlotArea int 0..1 off For overlay graphs
clipFlag int 0..2 0 v5.0.5 or higher required
Examples

OpenChart(0;​0;​400;​300)

OpenChart(100;​150;​400;​250;​on)

Description

OpenChart() makes it possible to position a chart precisely within a drawing or a view. By using the 5th argument isPlotArea, the arguments left, top, width and height either define the entire area incl. axes, title and legend (isPlotArea = off) or only the actual area of the graph (isPlotArea = on). For more information and examples, refer to Script Structure.

By using the argument clipFlag the clipping of the plot area can be controlled.
clipFlag =​ 0: Clip to the slightly enlarged plot area (this should avoid cutting off symbols or bubbles)
clipFlag =​ 1: Clip exactly to the plot area.
clipFlag =​ 2: Clip to the enclosing view.


OPEN_CHART_01
1

OpenDrawing(260;​150)

2

OpenChart(30;​30;​200;​90;​on;​0) /* clipFlag = 0 (default) */

3

ChartData(4 7 11 20 21 7;​ /* 1st series: x-values. */

4

4 10 8 10 8 5;​ /* 1st series: y-values. */

5

10 13 16 20;​ /* 2nd series: x-values. */

6

10 11 7 6) /* 2nd series: y-values. */

7

ScatterChart2D(shadow)

8

/* Set up styles. */

9

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

10

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

11

ShadowStyle(all;​2 2 5)

12

/* Set up axes. */

13

Scaling(x;​linear;​5;​20;​3)

14

Scaling(y;​linear;​5;​10;​5)

15

AxisLine(all;​0)

16

AxisMajorTicks(all;​0)

17

/* Set up grid. */

18

MajorGridLineWidths(all;​all;​0.25)

19

CloseChart()

20

CloseDrawing()

OPEN_CHART_01
OPEN_CHART_02
1

OpenDrawing(260;​150)

2

OpenChart(30;​30;​200;​90;​on;​1) /* clipFlag = 1: clip exactly to the plot area. */

3

ChartData(4 7 11 20 21 7;​ /* 1st series: x-values. */

4

4 10 8 10 8 5;​ /* 1st series: y-values. */

5

10 13 16 20;​ /* 2nd series: x-values. */

6

10 11 7 6) /* 2nd series: y-values. */

7

ScatterChart2D(shadow)

8

/* Set up styles. */

9

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

10

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

11

ShadowStyle(all;​2 2 5)

12

/* Set up axes. */

13

Scaling(x;​linear;​5;​20;​3)

14

Scaling(y;​linear;​5;​10;​5)

15

AxisLine(all;​0)

16

AxisMajorTicks(all;​0)

17

/* Set up grid. */

18

MajorGridLineWidths(all;​all;​0.25)

19

CloseChart()

20

CloseDrawing()

OPEN_CHART_02
OPEN_CHART_03
1

OpenDrawing(260;​150)

2

OpenChart(30;​30;​200;​90;​on;​2) /* clipFlag = 2: clip to the enclosing view. */

3

ChartData(4 7 11 20 21 7;​ /* 1st series: x-values. */

4

4 10 8 10 8 5;​ /* 1st series: y-values. */

5

10 13 16 20;​ /* 2nd series: x-values. */

6

10 11 7 6) /* 2nd series: y-values. */

7

ScatterChart2D(shadow)

8

/* Set up styles. */

9

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

10

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

11

ShadowStyle(all;​2 2 5)

12

/* Set up axes. */

13

Scaling(x;​linear;​5;​20;​3)

14

Scaling(y;​linear;​5;​10;​5)

15

AxisLine(all;​0)

16

AxisMajorTicks(all;​0)

17

/* Set up grid. */

18

MajorGridLineWidths(all;​all;​0.25)

19

CloseChart()

20

CloseDrawing()

OPEN_CHART_03
OPEN_CHART_04
1

OpenDrawing(420;​200)

2

/* Left plot. */

3

OpenChart(25;​20;​160;​150;​on;​1)

4

ChartData(-5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -2 -2 -2 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37 -31 -158 -153 -146 -135 -117 -90 -63 -45 -34 -27 -22 -169 -166 -162 -153 -135 -90 -45 -27 -18 -14 -11 180 180 180 180 180 0 0 0 0 0 0 169 166 162 153 135 90 45 27 18 14 11 158 153 146 135 117 90 63 45 34 27 22 149 143 135 124 108 90 72 56 45 37 31 141 135 127 117 104 90 76 63 53 45 39 135 129 121 112 101 90 79 68 59 51 45)

8

VectorPlot2D()

9

VectorPlotOptions(4 0;​;​35%;​0.5) /* After VectorPlot2D() */

10

/* Set up styles. */

11

LineStyle(1;​;​1;​86 111 145)

12

/* Set up axes. */

13

AxisLine(all;​0)

14

AxisMajorTicks(all;​10;​0.25;​40 40 40;​;​out)

15

/* Set up grid. */

16

MajorGridLineWidths(all;​all;​0)

17

GridFrame(all;​0.25)

18

CloseChart()

19

20

/* Right plot. */

21

OpenChart(240;​20;​160;​150;​on;​2)

22

ChartData(-5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -5 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -4 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -3 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 ;​

23

-5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 -5 -4 -3 -2 -1 0 1 2 3 4 5 ;​

24

7.1 6.4 5.8 5.4 5.1 5 5.1 5.4 5.8 6.4 7.1 6.4 5.7 5 4.5 4.1 4 4.1 4.5 5 5.7 6.4 5.8 5 4.2 3.6 3.2 3 3.2 3.6 4.2 5 5.8 5.4 4.5 3.6 2.8 2.2 2 2.2 2.8 3.6 4.5 5.4 5.1 4.1 3.2 2.2 1.4 1 1.4 2.2 3.2 4.1 5.1 5 4 3 2 1 0 1 2 3 4 5 5.1 4.1 3.2 2.2 1.4 1 1.4 2.2 3.2 4.1 5.1 5.4 4.5 3.6 2.8 2.2 2 2.2 2.8 3.6 4.5 5.4 5.8 5 4.2 3.6 3.2 3 3.2 3.6 4.2 5 5.8 6.4 5.7 5 4.5 4.1 4 4.1 4.5 5 5.7 6.4 7.1 6.4 5.8 5.4 5.1 5 5.1 5.4 5.8 6.4 7.1 ;​

25

-135 -129 -121 -112 -101 -90 -79 -68 -59 -51 -45 -141 -135 -127 -117 -104 -90 -76 -63 -53 -45 -39 -149 -143 -135 -124 -108 -90 -72 -56 -45 -37 -31 -158 -153 -146 -135 -117 -90 -63 -45 -34 -27 -22 -169 -166 -162 -153 -135 -90 -45 -27 -18 -14 -11 180 180 180 180 180 0 0 0 0 0 0 169 166 162 153 135 90 45 27 18 14 11 158 153 146 135 117 90 63 45 34 27 22 149 143 135 124 108 90 72 56 45 37 31 141 135 127 117 104 90 76 63 53 45 39 135 129 121 112 101 90 79 68 59 51 45)

26

VectorPlot2D()

27

VectorPlotOptions(4 0;​;​35%;​0.5) /* After VectorPlot2D() */

28

/* Set up styles. */

29

LineStyle(1;​;​1;​86 111 145)

30

/* Set up axes. */

31

AxisLine(all;​0)

32

AxisMajorTicks(all;​10;​0.25;​40 40 40;​;​out)

33

/* Set up grid. */

34

MajorGridLineWidths(all;​all;​0)

35

GridFrame(all;​0.25)

36

CloseChart()

37

CloseDrawing()

OPEN_CHART_04
Scroll to Top