author | Nishanth <nishanth@fossee.in> |
Tue, 12 Oct 2010 11:09:52 +0530 | |
changeset 332 | b702c10e5919 |
parent 255 | 75fd106303dc |
permissions | -rw-r--r-- |
332 | 1 |
Plot simple 2D functions on a linear range of x:\\ |
2 |
{\ex \lstinline| plot(f(x), (x, 0, 2*pi)|} |
|
3 |
||
4 |
Plot 2D plots where x and y are functions of another variable:\\ |
|
5 |
{\ex \lstinline| parametric_plot((f_x, f_y), (x, 0, 2*pi), (y, 0, 2*pi))|} |
|
255
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
6 |
|
332 | 7 |
Generate a sequence of points with a given seperation:\\ |
8 |
{\ex \lstinline| points = srange(2.5, 5.5, 0.25)|} |
|
9 |
||
10 |
Plot a line joining a list of pairs of points:\\ |
|
11 |
{\ex \lstinline| line(list_pairs)|} |
|
12 |
||
13 |
Show the plots:\\ |
|
14 |
{\ex \lstinline| show(plot_name)|} |
|
255
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
15 |
|
332 | 16 |
Show multiple plots:\\ |
17 |
{\ex \lstinline| show(p1+p2+p3)|} |
|
18 |
||
19 |
Set x-axis limits:\\ |
|
20 |
{\ex \lstinline| show(p1+p2, xmim=0, xmax=2*pi)|} |
|
255
75fd106303dc
Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff
changeset
|
21 |
|
332 | 22 |
Set y-axis limits:\\ |
23 |
{\ex \lstinline| show(p1+p2, ymim=-1.2, ymax=1.2)|} |
|
24 |
||
25 |
Plot 3D functions:\\ |
|
26 |
{\ex \lstinline| plot3d(f(x, y), (x, 0, 2*pi), (y, -1, 1))|} |
|
27 |
||
28 |
Plot 3D functions where x, y, z are functions of another variable:\\ |
|
29 |
{\ex \lstinline| parametric_plot3d((f_x, f_y, f_z), (t, 0, 10))|} |
|
30 |