graph_plot
Draw a scatter plot (nuage de points) from two lists of x and y values. The plot is automatically scaled to fit the specified dimensions.
graph_plot(
x,
y,
[width=320],
[height=200],
[padding=20],
[graduations],
[xmin],
[xmax],
[ymin],
[ymax],
[radius=3],
[stroke=#000000],
[fill=#FFFFFF],
[weight=1.00]
)
Draw a scatter plot (nuage de points) from two lists of x and y values. The plot is automatically scaled to fit the specified dimensions.
Syntaxe
var x = [1, 2, 3, 4, 5];
var y = [10, 20, 15, 25, 30];
graph_plot(x, y, width=400, height=300, padding=40, graduations="#000", radius=5, fill="#FF5722");
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x | yes | - | List of x values | |
y | yes | - | List of y values | |
width | - | 320 | width of graph area | |
height | - | 200 | height of graph area | |
padding | - | 20 | Internal padding | |
graduations | - | - | Color of axes and ticks (e.g. '#000'). If 'none', no graduations. | |
xmin | - | - | Override minimum X value | |
xmax | - | - | Override maximum X value | |
ymin | - | - | Override minimum Y value | |
ymax | - | - | Override maximum Y value | |
radius | - | 3 | radius of circles | |
stroke | - | #000000 | Stroke color | |
fill | - | #FFFFFF | Fill color | |
weight | - | 1.00 | Stroke weight (thickness) |