summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnoop Jacob Thomas2010-09-16 15:15:01 +0530
committerAnoop Jacob Thomas2010-09-16 15:15:01 +0530
commitfb5c1ead9084c66c2d5878b6d4714687764591b3 (patch)
tree8772f4dee95d2ac7f71c322a9a8354bbb9d83371
parent434daa765bd8294f99c9439e65afa78f5d50f3b9 (diff)
downloadst-scripts-fb5c1ead9084c66c2d5878b6d4714687764591b3.tar.gz
st-scripts-fb5c1ead9084c66c2d5878b6d4714687764591b3.tar.bz2
st-scripts-fb5c1ead9084c66c2d5878b6d4714687764591b3.zip
did internal review 1 of embellishing a plot.
-rw-r--r--embellishing_a_plot.rst32
1 files changed, 27 insertions, 5 deletions
diff --git a/embellishing_a_plot.rst b/embellishing_a_plot.rst
index 101ea28..a696672 100644
--- a/embellishing_a_plot.rst
+++ b/embellishing_a_plot.rst
@@ -16,7 +16,7 @@ Let us start ipython with pylab loaded, by typing
on the terminal
-{{{ shit to terminal and type ipython -pylab }}}
+{{{ shift to terminal and type ipython -pylab }}}
We shall first make a simple plot and start with decorating it.
::
@@ -28,8 +28,10 @@ As you can see, the colour and thickness of line as decided by pylab. It would
be nice if we could control these parameters in the plot. This is possible by
passing additional arguments to the plot command.
+.. #[[Anoop: I think it will be good to rephrase the sentence]]
+
The second argument that we shall be passing is colour. We shall first clear
-the figure and plot the same in red colour.Hence
+the figure and plot the same in red colour. Hence
::
clf()
@@ -38,17 +40,24 @@ the figure and plot the same in red colour.Hence
Plots the same curve but now in red colour.
To alter the thickness of the line, we use the =linewidth= argument in the plot
-command.Hence
+command. Hence
::
plot(x, cos(x), linewidth=2)
produces a plot with a thicker line.
-{{{ Show the plot and compare the sin and cos plots }}}
+.. #[[Anoop: I guess it will be good if you say that it affects the
+ same plot, as you have not cleared the figure]]
+
+{{{ Show the plot and compare the sine and cos plots }}}
{{{ Pause here and try out the following exercises }}}
+.. #[[Anoop: is the above a context switch for the person who does the
+ recording, other wise if it an instruction to the person viewing the
+ video, then I guess the three braces can be removed.]]
+
%% 1 %% Plot sin(x) in blue colour and with linewidth as 3
{{{ continue from paused state }}}
@@ -58,11 +67,17 @@ A combination of colour and linewidth would do the job for us. Hence
plot(x, sin(x), 'b', linewidth=3)
+.. #[[Anoop: add clf()]]
+
produces the required plot
#[Nishanth]: I could not think of a SIMPLE recipe approach for introducing
linestyle. Hence the naive approach.
+.. #[[Anoop: I guess the recipe is fine, but would be better if you
+ add the problem statement rather than just saying "let's do a simple
+ plot"]]
+
Occasionally we would also want to alter the style of line. Sometimes all we
want is just a bunch of points not joined. This is possible by passing the
linestyle argument along with or instead of the colour argument.Hence
@@ -88,6 +103,8 @@ Other available options can be seen in the documentation of plot.
{{{ Pause here and try out the following exercises }}}
+.. #[[Anoop: same question as above, should it be read out?]]
+
%% 2 %% Plot the sine curve with green filled circles.
{{{ continue from paused state }}}
@@ -147,6 +164,8 @@ and we get the polynomial formatted properly.
#[Nishanth]: Unsure if I have to give this exercise since enclosing the whole
string in LaTex style is not good
+.. #[[Anoop: I guess you can go ahead with the LaTex thing, it's cool!]]
+
{{{ Pause here and try out the following exercises }}}
%% 4 %% Change the title of the figure such that the whole title is formatted
@@ -210,6 +229,9 @@ As you can see, the first argument to =annotate= command is the name we would
like to mark the point as and the argument after xy= is the point at which the
name should appear.
+.. #[[Anoop: I think we should tell explicitely that xy takes a
+ sequence or a tuple]]
+
{{{ Pause here and try out the following exercises }}}
%% 6 %% Make an annotation called "root" at the point (-4, 0)
@@ -238,6 +260,6 @@ Hope you have enjoyed and found it useful.
Thankyou
.. Author : Nishanth
- Internal Reviewer 1 :
+ Internal Reviewer 1 : Anoop
Internal Reviewer 2 :
External Reviewer :