TESTER

graph_line

graph_line(x, y, [width=320], [height=200], [padding=20], [graduations], [xmin], [xmax], [ymin], [ymax], [stroke], [weight])

Draw a line graph from two lists of x and y values. The plot is automatically scaled to fit the specified dimensions.

Syntaxe

var x = [0, 1, 2, 3, 4, 5];
var y = [0, 10, 5, 15, 10, 20];
graph_line(x, y, width=400, height=300, padding=30, graduations="#2196F3", stroke="#2196F3", weight=2);

Arguments

NameRequiredDefaultDescription
xyes-List of x values
yyes-List of y values
width-320width of graph area
height-200height of graph area
padding-20Internal 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
stroke--Stroke color
weight--Stroke weight (thickness)