![]() |
Jupyter at Bryn Mawr College |
|
|
Public notebooks: /services/public/dblank / Experiments |
import math
import numpy
import toyplot
x = numpy.arange(0, 10, 0.1)
y1 = [math.sin(x) for x in x]
y2 = [math.cos(x) for x in x]
y3 = [v1 + v2 for v1, v2 in zip(y1, y2)]
canvas = toyplot.Canvas(width=600, height=300)
axes = canvas.cartesian()
axes.plot(x, y1)
axes.plot(x, y2)
axes.plot(x, y3)