plotting-data/questions.rst
author Anoop Jacob Thomas<anoop@fossee.in>
Thu, 28 Oct 2010 13:19:28 +0530
changeset 371 d87828051c69
parent 322 3cacbcad4c42
child 372 8e05616c4102
permissions -rw-r--r--
made changes to using python modules script after internal review.

Objective Questions
-------------------

.. A mininum of 8 questions here (along with answers)

1. How do you declare a sequence of numbers in python?
   Give example .
   
   Comma seperated numbers inside two square brackets.

   seq=[1.5,3.2,8.7]


2. Square the following sequence? 
   
   distance_values=[2.1,4.6,8.72,9.03].

   square(distance_values)
   
 

3. How do you plot points ?

   By passing an extra parameter '.'.

4. What does the parameter 'o' do ?

   It plots large points.

5. How do you plot error in Python?

   Using the function error bar.

6. How do I get large red colour dots on a plot?

   By passing the paramter 'ro'.

7. What are the parameters 'xerr' and 'yerr' in errorbar function for?
   
   xerr - List of error values of variable on x axis.
   yerr - List of error values of variable on y ayis.
   
8. How would you plot error bar with a line?

   The fmt parameter for a line will be '-'.




Larger Questions
----------------

.. A minimum of 2 questions here (along with answers)

1. Question 1
2. Question 2