embellishing_a_plot.rst
author Puneeth Chaganti <punchagan@gmail.com>
Thu, 16 Sep 2010 12:10:16 +0530
changeset 144 476ea1730aee
parent 138 85ed0d5d28f8
child 159 8efa612b17e1
permissions -rw-r--r--
Added rst files for scripts.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     1
Hello friends and welcome to the tutorial on Embellishing Plots
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     2
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     3
{{{ Show the slide containing title }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     4
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     5
{{{ Show the slide containing the outline slide }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     6
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     7
In this tutorial, we shall look at how to modify the colour, thickness and 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     8
linestyle of the plot. We shall then learn how to add title to the plot and 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
     9
then look at adding labels to x and y axes. we shall also look at adding 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    10
annotations to the plot.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    11
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    12
Let us start ipython with pylab loaded, by typing
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    13
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    14
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    15
    ipython -pylab
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    16
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    17
on the terminal
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    18
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    19
{{{ shit to terminal and type ipython -pylab }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    20
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    21
We shall first make a simple plot and start with decorating it.
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    22
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    23
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    24
    x = linspace(-2, 4, 20)
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    25
    plot(x, sin(x))
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    26
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    27
As you can see, the colour and thickness of line as decided by pylab. It would
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    28
be nice if we could control these parameters in the plot. This is possible by
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    29
passing additional arguments to the plot command.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    30
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    31
The second argument that we shall be passing is colour. We shall first clear
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    32
the figure and plot the same in red colour.Hence
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    33
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    34
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    35
    clf()
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    36
    plot(x, sin(x), 'r')
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    37
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    38
Plots the same curve but now in red colour.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    39
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    40
To alter the thickness of the line, we use the =linewidth= argument in the plot
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    41
command.Hence
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    42
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    43
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    44
    plot(x, cos(x), linewidth=2)
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    45
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    46
produces a plot with a thicker line.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    47
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    48
{{{ Show the plot and compare the sin and cos plots }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    49
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    50
{{{ Pause here and try out the following exercises }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    51
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    52
%% 1 %% Plot sin(x) in blue colour and with linewidth as 3
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    53
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    54
{{{ continue from paused state }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    55
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    56
A combination of colour and linewidth would do the job for us. Hence
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    57
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    58
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    59
    plot(x, sin(x), 'b', linewidth=3)
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    60
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    61
produces the required plot
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    62
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    63
#[Nishanth]: I could not think of a SIMPLE recipe approach for introducing
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    64
             linestyle. Hence the naive approach.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    65
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    66
Occasionally we would also want to alter the style of line. Sometimes all we
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    67
want is just a bunch of points not joined. This is possible by passing the
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    68
linestyle argument along with or instead of the colour argument.Hence
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    69
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    70
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    71
    clf()
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    72
    plot(x, sin(x), '.')
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    73
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    74
produces a plot with only points.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    75
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    76
To produce the same plot but now in blue colour, we do
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    77
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    78
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    79
    clf()
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    80
    plot(x, sin(x), 'b.')
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    81
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    82
Other available options can be seen in the documentation of plot.
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    83
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    84
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    85
    plot?
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    86
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    87
{{{ Run through the documentation and show the options available }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    88
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    89
{{{ Pause here and try out the following exercises }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    90
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    91
%% 2 %% Plot the sine curve with green filled circles.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    92
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    93
{{{ continue from paused state }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    94
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    95
All we have to do is use a combination of linestyle and colour to acheive this.
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    96
Hence
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
    97
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    98
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
    99
    clf()
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   100
    plot(x, cos(x), 'go')
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   101
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   102
produces the required plot.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   103
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   104
{{{ Pause here and try out the following exercises }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   105
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   106
%% 3 %% Produce a plot of tangent curve with red dashed line and linewidth 3
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   107
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   108
{{{ continue from paused state }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   109
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   110
Now that we know how to produce a bare minimum plot with colour, style and
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   111
thickness of our interest, we shall look at decorating the plot.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   112
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   113
Let us start with a plot of the function -x^2 + 4x - 5.
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   114
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   115
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   116
    plot(x, -x*x + 4*x - 5, 'r', linewidth=2)
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   117
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   118
{{{ Show the plot window and switch back to terminal }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   119
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   120
We now have the plot in a colour and linewidth of our interest. As you can see,
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   121
the figure does have any description describing the plot.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   122
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   123
We will now add a title to the plot by using the =title= command.
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   124
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   125
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   126
    title("Parabolic function -x^2+4x-5") 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   127
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   128
{{{ Show the plot window and point to the title }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   129
The figure now has a title which describes what the plot is.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   130
The =title= command as you can see, takes a string as argument and set the
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   131
title accordingly.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   132
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   133
The formatting in title is messed and it does not look clean. You can imagine
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   134
what would be the situation if there were fractions and more complex functions
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   135
like log and exp. Wouldn't it be good if there was LaTex like formatting.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   136
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   137
That is also possible by adding a $ sign before and after the part of the 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   138
string that should be LaTex style.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   139
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   140
for instance, we can use
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   141
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   142
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   143
    title("Parabolic function $-x^2+4x-5$")
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   144
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   145
and we get the polynomial formatted properly.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   146
130
5b04f1c63b16 added a comment
nishanth
parents: 129
diff changeset
   147
#[Nishanth]: Unsure if I have to give this exercise since enclosing the whole
5b04f1c63b16 added a comment
nishanth
parents: 129
diff changeset
   148
             string in LaTex style is not good
5b04f1c63b16 added a comment
nishanth
parents: 129
diff changeset
   149
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   150
{{{ Pause here and try out the following exercises }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   151
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   152
%% 4 %% Change the title of the figure such that the whole title is formatted
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   153
        in LaTex style
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   154
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   155
{{{ continue from the paused state }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   156
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   157
The solution is to enclose the whole string in between $. Hence,
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   158
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   159
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   160
    title("$Parabolic function -x^2+4x-5$")
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   161
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   162
gives a title that looks neatly formatted.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   163
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   164
Although we have title, the plot is not complete without labelling x and y
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   165
axes. Hence we shall label x-axis to "x" and y-axis to "f(x)"
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   166
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   167
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   168
    xlabel("x")
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   169
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   170
{{{ Switch to plot window and show the xlabel }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   171
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   172
As you can see, =xlabel= command takes a string as argument, similar to the
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   173
=title= command and sets it to x-axis.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   174
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   175
Similarly,
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   176
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   177
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   178
    ylabel("f(x)")
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   179
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   180
sets the name of y-axis as "f(x)"
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   181
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   182
{{{ Show the plot window and point to ylabel and switch back to terminal }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   183
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   184
{{{ Pause here and try out the following exercises }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   185
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   186
%% 5 %% Set the x and y labels as "x" and "f(x)" in LaTex style.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   187
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   188
{{{ continue from paused state }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   189
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   190
Since we need LaTex style formatting, all we have to do is enclose the string
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   191
in between two $. Hence,
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   192
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   193
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   194
    xlabel("$x$")
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   195
    yalbel("$f(x)$")
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   196
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   197
does the job for us.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   198
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   199
{{{ Show the plot window with clean labels }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   200
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   201
The plot is now almost complete. Except that we have still not seen how to 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   202
name the points. For example the point (2, -1) is the local maxima. We would
138
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   203
like to name the point accordingly. We can do this by using
85ed0d5d28f8 added a newline before :: so that a colon does not appear in html
nishanth
parents: 130
diff changeset
   204
::
129
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   205
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   206
    annotate("local maxima", xy=(2, -1))
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   207
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   208
{{{ Show the annotation that has appeared on the plot }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   209
As you can see, the first argument to =annotate= command is the name we would
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   210
like to mark the point as and the argument after xy= is the point at which the
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   211
name should appear.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   212
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   213
{{{ Pause here and try out the following exercises }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   214
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   215
%% 6 %% Make an annotation called "root" at the point (-4, 0)
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   216
        What happens to the first annotation ?
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   217
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   218
{{{ continue from paused state }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   219
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   220
As we can see, every annotate command makes a new annotation on the figure.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   221
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   222
{{{ Show summary slide }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   223
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   224
we have looked at 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   225
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   226
 * Modifying the attributes of plot by passing additional arguments
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   227
 * How to add title
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   228
 * How to incorporate LaTex style formatting
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   229
 * How to label x and y axes
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   230
 * How to add annotations
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   231
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   232
{{{ Show the "sponsored by FOSSEE" slide }}}
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   233
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   234
#[Nishanth]: Will add this line after all of us fix on one.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   235
This tutorial was created as a part of FOSSEE project, NME ICT, MHRD India
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   236
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   237
Hope you have enjoyed and found it useful.
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   238
Thankyou
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   239
 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   240
.. Author              : Nishanth
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   241
   Internal Reviewer 1 : 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   242
   Internal Reviewer 2 : 
dcb9b50761eb initial commit of the file
nishanth
parents:
diff changeset
   243
   External Reviewer   :