{{{id=1|
#Let's try to plot some expressions and functions with the plot command.
#Note that the default plot color is blue
var("y z a b c d n m"); assume(n, "integer"); assume(m, "integer")
///
}}}
{{{id=2|
#Plot exponential curve using a closed box frame
plot(exp(-2*x), x, 0, 4, frame=True)
///
}}}
{{{id=13|
#Change the color to red and change the thickness to something larger than the default.
#Also, add a title in the default position
f(x) = x^2 - 2*x + 1
plot(f(x), x, 0, 2, frame=True, color="red", thickness=3, title="Parabola");
///
}}}
{{{id=11|
#Use list_plot to plot a set of 100 (x,y) points according to the previous function
xpoints = [ 0.02*i for i in range(100) ] #Generate list of x values using list comprehension
point_list = [ (x, f(x)) for x in xpoints ] #Generate list of (x,y) points using list comprehension
plot(points(point_list, size=40, color="green"), frame=True)
///
}}}
{{{id=12|
///
}}}