plotting_using_sage/quickref.tex
author Puneeth Chaganti <punchagan@gmail.com>
Wed, 27 Oct 2010 13:05:03 +0530
changeset 360 270b7f0715c9
parent 332 b702c10e5919
permissions -rw-r--r--
Updated progress.org.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
332
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     1
Plot simple 2D functions on a linear range of x:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     2
{\ex \lstinline|    plot(f(x), (x, 0, 2*pi)|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     3
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     4
Plot 2D plots where x and y are functions of another variable:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     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
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     7
Generate a sequence of points with a given seperation:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     8
{\ex \lstinline|    points = srange(2.5, 5.5, 0.25)|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
     9
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    10
Plot a line joining a list of pairs of points:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    11
{\ex \lstinline|    line(list_pairs)|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    12
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    13
Show the plots:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    14
{\ex \lstinline|    show(plot_name)|}
255
75fd106303dc Added the script to plotting_using_sage
Nishanth <nishanth@fossee.in>
parents:
diff changeset
    15
332
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    16
Show multiple plots:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    17
{\ex \lstinline|    show(p1+p2+p3)|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    18
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    19
Set x-axis limits:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    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
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    22
Set y-axis limits:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    23
{\ex \lstinline|    show(p1+p2, ymim=-1.2, ymax=1.2)|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    24
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    25
Plot 3D functions:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    26
{\ex \lstinline|    plot3d(f(x, y), (x, 0, 2*pi), (y, -1, 1))|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    27
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    28
Plot 3D functions where x, y, z are functions of another variable:\\
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    29
{\ex \lstinline|    parametric_plot3d((f_x, f_y, f_z), (t, 0, 10))|}
b702c10e5919 Finised plotting_using_sage
Nishanth <nishanth@fossee.in>
parents: 255
diff changeset
    30