diff options
-rw-r--r-- | other-type-of-plots/script.rst | 31 | ||||
-rw-r--r-- | progress.org | 4 |
2 files changed, 26 insertions, 9 deletions
diff --git a/other-type-of-plots/script.rst b/other-type-of-plots/script.rst index 9664dd0..4bb5480 100644 --- a/other-type-of-plots/script.rst +++ b/other-type-of-plots/script.rst @@ -22,6 +22,7 @@ External Reviewer : Checklist OK? : <put date stamp here, if OK> [2010-10-05] +.. #[Puneeth: Quickref missing] =================== Other type of plots @@ -31,12 +32,21 @@ Other type of plots Hello and welcome to the tutorial other type of plots. +.. #[Puneeth: this sentence doesn't read well] + {{{ show the outline slide }}} +.. #[Puneeth: motivate looking at other plots. Why are we looking at +.. them? Tell that we have only looked at one type of plot all the +.. while, etc.] + In this tutorial we will cover scatter plot, pie chart, bar chart and -loglog plot. We will also see few other plots and also introduce you to +log-log plot. We will also see few other plots and also introduce you to the matplotlib help. +.. #[Puneeth: cover, see and introduce you. be consistent. does, the +.. "We" include the viewer or not?] + Let us start with scatter plot. {{{ switch to the next slide, scatter plot }}} @@ -47,8 +57,7 @@ horizontal axis and the value of the other variable determining the position on the vertical axis. This kind of plot is also called a scatter chart, scatter diagram and scatter graph. -Before we proceed further get your IPython interpreter running with -the ``-pylab`` option. Start your IPython interpreter as +Before we proceed further, start your IPython interpreter :: ipython -pylab @@ -59,9 +68,9 @@ ipython -pylab }}} {{{ switch to the next slide having the problem statement of first exercise }}} -Now, let us plot a scatter plot showing the percentage profit of company A -from the year 2000-2010. The data for the same is available in the -file ``company-a-data.txt``. +Now, let us plot a scatter plot showing the percentage profit of +company A from the year 2000-2010. The data for the same is available +in the file ``company-a-data.txt``. {{{ open the file company-a-data.txt and show the content }}} @@ -78,6 +87,9 @@ and it can be done as :: year,profit = loadtxt('/home/fossee/other-plot/company-a-data.txt',dtype=type(int())) +.. #[Puneeth: make a remark about dtype, that has not been covered in +.. the loadtxt tutorial.] + {{{ switch to next slide, ``scatter`` function }}} Now in-order to generate the scatter graph we will use the function @@ -104,6 +116,9 @@ Pause here and solve the question before moving on. Now let us move on to pie chart. +.. #[Puneeth: instead of just saying that, say that let's plot a pie +.. chart for the same data. continuity, will be good.] + {{{ switch to the slide which says about pie chart }}} A pie chart or a circle graph is a circular chart divided into @@ -116,6 +131,8 @@ Plot a pie chart representing the profit percentage of company A, with the same data from file ``company-a-data.txt``. So let us reuse the data we have loaded from the file previously. +.. #[Puneeth, this part can be move above.] + {{{ switch to next slide, ``pie()`` function }}} We can plot the pie chart using the function ``pie()``. @@ -192,7 +209,7 @@ exercise question }}} Plot a `log-log` chart of y=5*x\ :sup:`3` for x from 1-20. Before we actually plot let us calculate the points needed for -that. And it could be done as, +that. :: x = linspace(1,20,100) diff --git a/progress.org b/progress.org index 77573e4..9c07b9e 100644 --- a/progress.org +++ b/progress.org @@ -3,14 +3,14 @@ | 1.2 LO: | getting started with =ipython= | 2 | Punch | Pending | | | 1.3 LO: | using the =plot= command interactively | 2 | Amit | | | | 1.4 LO: | embellishing a plot | 2 | Nishanth | Anoop (Done) | | -| 1.5 LO: | saving plots | 2 | Anoop | | | +| 1.5 LO: | saving plots | 2 | Anoop | Punch (Done) | | | 1.6 LO: | multiple plots | 3 | Madhu | Nishanth (Done) | | | 1.7 LO: | additional features of IPython | 2 | Nishanth | Amit (Pending) | | | 1.8 LO: | module level assessment | 3 | Madhu | | | |---------+----------------------------------------+-------+----------+---------------------------------------+-----------| | 2.2 LO: | loading data from files | 3 | Punch | Nishanth (Done) | | | 2.3 LO: | plotting the data | 3 | Amit | | | -| 2.4 LO: | other types of plots | 3 | Anoop | Pending | | +| 2.4 LO: | other types of plots | 3 | Anoop | Punch (Done) | | | 2.5 LO: | module level assessment | 3 | Nishanth | | | |---------+----------------------------------------+-------+----------+---------------------------------------+-----------| | 3.1 LO: | getting started with lists | 2 | Amit | | | |