plotting-data/questions.rst
author Puneeth Chaganti <punchagan@fossee.in>
Wed, 20 Oct 2010 16:19:55 +0530
changeset 341 9f7eb1ed0e08
parent 322 3cacbcad4c42
child 372 8e05616c4102
permissions -rw-r--r--
Merged heads.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
322
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     1
Objective Questions
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     2
-------------------
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     3
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     4
.. A mininum of 8 questions here (along with answers)
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     5
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     6
1. How do you declare a sequence of numbers in python?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     7
   Give example .
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     8
   
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
     9
   Comma seperated numbers inside two square brackets.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    10
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    11
   seq=[1.5,3.2,8.7]
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    12
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    13
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    14
2. Square the following sequence? 
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    15
   
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    16
   distance_values=[2.1,4.6,8.72,9.03].
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    17
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    18
   square(distance_values)
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    19
   
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    20
 
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    21
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    22
3. How do you plot points ?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    23
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    24
   By passing an extra parameter '.'.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    25
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    26
4. What does the parameter 'o' do ?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    27
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    28
   It plots large points.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    29
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    30
5. How do you plot error in Python?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    31
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    32
   Using the function error bar.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    33
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    34
6. How do I get large red colour dots on a plot?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    35
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    36
   By passing the paramter 'ro'.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    37
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    38
7. What are the parameters 'xerr' and 'yerr' in errorbar function for?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    39
   
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    40
   xerr - List of error values of variable on x axis.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    41
   yerr - List of error values of variable on y ayis.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    42
   
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    43
8. How would you plot error bar with a line?
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    44
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    45
   The fmt parameter for a line will be '-'.
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    46
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    47
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    48
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    49
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    50
Larger Questions
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    51
----------------
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    52
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    53
.. A minimum of 2 questions here (along with answers)
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    54
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    55
1. Question 1
3cacbcad4c42 Adding plotting data
amit
parents:
diff changeset
    56
2. Question 2