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