added few questions for other-type-of-plots.
Binary file other-type-of-plots/bar-chart-hatch.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/other-type-of-plots/company-a-data.txt Mon Oct 11 14:02:36 2010 +0530
@@ -0,0 +1,2 @@
+2.000000000000000000e+03 2.001000000000000000e+03 2.002000000000000000e+03 2.003000000000000000e+03 2.004000000000000000e+03 2.005000000000000000e+03 2.006000000000000000e+03 2.007000000000000000e+03 2.008000000000000000e+03 2.009000000000000000e+03 2.010000000000000000e+03
+2.300000000000000000e+01 5.500000000000000000e+01 3.200000000000000000e+01 6.500000000000000000e+01 8.800000000000000000e+01 5.000000000000000000e+00 1.400000000000000000e+01 6.700000000000000000e+01 2.300000000000000000e+01 2.300000000000000000e+01 1.200000000000000000e+01
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/other-type-of-plots/questions.rst Mon Oct 11 14:02:36 2010 +0530
@@ -0,0 +1,37 @@
+Objective Questions
+-------------------
+
+.. A mininum of 8 questions here (along with answers)
+
+1. What is a log-log chart?
+
+ a. A straight line graph
+ #. A graph on the logarithmic scale
+ #. A graph on the logarithmic scale with different scales for x and
+ y axes
+ #. A graph in which x axis is represented in logarithmic scale.
+
+Answer: A graph on the logarithmic scale with different scales for x
+ and y axes
+
+2. We have two lists with us ``years`` and ``profit``, what statement
+ can be issued to plot a pie chart to plot the profit for each year,
+ and each wedge has to be labelled with the corresponding year.
+
+Answer: pie(profit, labels=years)
+
+3.
+
+Larger Questions
+----------------
+
+.. A minimum of 2 questions here (along with answers)
+
+1. Plot a log-log chart of the equation y=4*x\ :sup:`2` + 3*x for x
+ from -50 to 50.
+
+2. Plot a bar chart which is filled with white color and which is
+ hatched with 135\ :sup:`o` slanting lines for the data given in the
+ `file(company A data) <company-a-data.txt>`_ which has years and
+ profit percentage for each year.
+
--- a/other-type-of-plots/script.rst Mon Oct 11 12:49:08 2010 +0530
+++ b/other-type-of-plots/script.rst Mon Oct 11 14:02:36 2010 +0530
@@ -20,7 +20,6 @@
log plot. We will also see few other plots and also introduce you to
the matplotlib help.
-
Let us start with scatter plot.
{{{ switch to the next slide }}}
@@ -55,11 +54,12 @@
{{{ close the file and switch to the terminal }}}
-To product the scatter plot first we need to load the data from the
+To produce the scatter plot first we need to load the data from the
file using ``loadtxt``. We learned in one of the previous sessions,
and it can be done as ::
- year,profit = loadtxt('/home/fossee/other-plot/company-a-data.txt',dtype=type(int()))
+ year,profit =
+ loadtxt('/home/fossee/other-plot/company-a-data.txt',dtype=type(int()))
Now in-order to generate the scatter graph we will use the function
``scatter()``
@@ -100,9 +100,9 @@
pie(profit,labels=year)
-Notice that we passed two arguments to the function ``pie()``. The
-first one the values and the next one the set of labels to be used in
-the pie chart.
+Notice that we passed two arguments to the function ``pie()``. First
+one the values and the next one the set of labels to be used in the
+pie chart.
{{{ switch to the next slide which has the problem statement of
problem to be tried out }}}
@@ -195,14 +195,10 @@
Help about matplotlib can be obtained from
matplotlib.sourceforge.net/contents.html
-.. #[[Anoop: I am not so sure how to do the rest of it, so I guess we
- can just browse through the side and tell them few. What is your
- opinion??]]
-Now let us see few plots from
-matplotlib.sourceforge.net/users/screenshots.html
-
-{{{ browse through the site quickly }}}
+More plots can be seen at
+matplotlib.sourceforge.net/users/screenshots.html and also at
+matplotlib.sourceforge.net/gallery.html
{{{ switch to recap slide }}}