The plotarea
or areaplot
command draws the area below a graph.
plotarea takes two mandatory arguments and two
optional arguments:
expr, an expression representing the function to
graph.
var=a..b, the variable and the range of values.
Optionally, n.
Optionally, method, a method to approximate the
region under the graph, which can be one of:
trapezoid,
rectangle_left,
rectangle_right or
middle_point.
plotarea(expr,var=a..b)
draws and shades the area between the graph of expr and the
y-axis for a < var < b.
plotarea(expr,var=a..b ⟨,n,method ⟩)
draws and shades the region used by the numeric approximation method
method for area between the graph of expr and the
y-axis for a < var < b, when [a,b] is cut into n
equal parts, along with the graph in red.