In [2]:
import math
import numpy
import toyplot
In [8]:
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)]
In [9]:
canvas = toyplot.Canvas(width=600, height=300)
axes = canvas.cartesian()
axes.plot(x, y1)
axes.plot(x, y2)
axes.plot(x, y3)
Out[9]:
<toyplot.mark.Plot at 0x7ff9c30a3898>
0510-101