Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

That is it. You can also use the sum command to combine a list of plot objects.

f=x^2+10
p=[]
for i in range(0,5):
    p.append(plot(f-i,(x,-3,3)))
sum(p)

You can use list comprehensions in Python to shorten this significantly and produce the same result.

sum([plot(x^2+10 - i,(x,-3,3)) for i in range(0,5)])