You may be able to try some of this code out in your browser at Repl.it.
Simple Scatter Plot
Plot some dots on a chart and color them in.
Simple Line Chart
Make a line chart from with domain 0 to 1 and range from ymin to ymax. With red line.
Line Chart with Custom Domain
In case you want to see more than just x at the interval [0, 1]. See the implementation of the range() function.