plot() plots an explicit function of 1 independent cartesian (rectangular) variable in the plane. You need a function and a range. Everything else is optional.

Options for 2d plot: figsize,aspect_ratio, ymin, ymax, ... Options are separated by commas. See the examples in the sage pages!

Option

Example

Comment

figsize

figsize=4

The size of the bounding box Default is 8

aspect_ratio

aspect_ratio=5

5 stretches the y-axis by factor of 5
0.2 shrinks the y-axis by factor of 5

Default is 1, but actual ratio depends on ranges of x and y

3D: aspect_ratio=[2,1,3] (three numbers)

ymin

ymin=0

The bottom of the bounding box.

Default is determined by the y-values for the x-range

ymax

ymax=5

The top of the bounding box.

Default is determined by the y-values for the x-range

Options for 1d object: color,alpha, thickness, linestyle, ...

Since the plot of y=f(x) is a curve which is a 1d object, we include some 1d object options. See also: 1d Objects

Home > Commands -> 2d Commands ->

plot## EXAMPLES ON MY SAGE PAGE: plot - Options

Syntax:plot(f(x), (x,xmin, xmax),options for 1d object, options for 2d plot)plot()plots an explicit function of 1 independent cartesian (rectangular) variable in the plane. You need a function and a range. Everything else is optional.Options for 2d plot: figsize, aspect_ratio, ymin, ymax, ... Options are separated by commas.

See the examples in the sage pages!OptionExampleCommentfigsize=4Default is

8aspect_ratio=50.2 shrinks the y-axis by factor of 5

Default is 1, but actual ratio depends on ranges of x and y

3D: aspect_ratio=[2,1,3] (three numbers)

ymin=0Default is determined by the y-values for the x-range

ymax=5Default is determined by the y-values for the x-range

Options for 1d object: color, alpha, thickness, linestyle, ...

color='red'rgbcolor=(0,.7,0)

hue

Default is 'blue'

alpha=0.5To make something

, use alpha=0.invisibleDefault is

13D command is:

opacitythickness=30.5 is 2 times thinner

Default is 1

linestyle='--'Reference: http://www.sagemath.org/doc/reference/sage/plot/plot.html

Keywords:plot, 2d plot, 2d plot options, 1d object options, function, explicit