canvas()

Read(4725) Label: canvas object, plotting,

Description:

Define a canvas object.

Syntax:

canvas()

Note:

 

With esProc, you can directly use canvas() function in a cell to define a canvas object, or assign a canvas object to a parameter. During the latter plotting, you just need to call the cell name or the parameter name to use the canvas object. Three steps for drawing a chart with esProc:

1. Use canvas() to define a canvas object;

2. Use G.plot() to plot elements the chart will use;

3. Use G.draw() to draw the chart.

Return value:

  Canvas object

Example:

 

A

 

1

=canvas()

Define a canvas object.

2

=A1.plot("Text",

"text":"hello word!",

"width":200,

"height":200,

"barType":256,

"data1":250,

"data2":250)

Plot chart elements. Use Text element to plot 2D barcode.

3

=A1.draw(400,400)

Draw the chart in a canvas whose width and height are both 400pixels. Click Browse Graphs in the Value Viewing Section, or right-click the current cell to select Browse Graphs to view the 2D barcode as follows:

 

 

 

A

 

1

>map1=canvas()

Define a canvas object and assign it to parameter map1. You can reference the parameter directly through the name during plotting.

Related function:

  G.plot()

  G.draw()