Simple Two-Dimensional Line Plot
Description
Sage can plot a line between two points.
Sage Cell
Code
line([(0,0), (1,1)])
Options
Option
Calculus teachers draw the following plot frequently on the board: not just one branch of $\arcsin$ but rather several of them: i.e., the plot of $y=\sin(x)$ for $-2\pi \leq x \leq 2 \pi$ flipped about the 45 degree line. The following Sage commands construct this:
Code
v = [(sin(x),x) for x in srange(-2*float(pi),2*float(pi),0.1)]
line(v)
Tags
Primary Tags: Plotting: Two-dimensional plots
Secondary Tags: Two-dimensional plots: Line plots
Related Cells
Attribute
Permalink:
Author: Sage Tutorial v7.6
Date: 09 Jul 2017 07:37
Submitted by: Tom Judson