other-type-of-plots/questions.rst
changeset 289 3b801e60246a
parent 288 a3b98b4c371e
equal deleted inserted replaced
288:a3b98b4c371e 289:3b801e60246a
    18    can be issued to plot a pie chart to plot the profit for each year,
    18    can be issued to plot a pie chart to plot the profit for each year,
    19    and each wedge has to be labelled with the corresponding year.
    19    and each wedge has to be labelled with the corresponding year.
    20 
    20 
    21 Answer: pie(profit, labels=years)
    21 Answer: pie(profit, labels=years)
    22 
    22 
    23 3. 
    23 3. We have two lists with us ``years`` and profit``, what statement
       
    24    can be issued to plot a scatter plot of the data in blue colored
       
    25    diamonds. ``years`` has to be plotted along x-axis.
       
    26 
       
    27 Answer: scatter(year,profit,color='blue',marker='d')
       
    28 
       
    29 4. ``scatter(x, y, color='blue', marker='d')`` and ``plot(x, y,
       
    30    color='b', marker='d')`` does exactly the same.
       
    31 
       
    32    a. True
       
    33    #. False
       
    34 
       
    35 Answer: False
       
    36 
       
    37 5. ``plot(x, y, 'bd')`` creates a scattered plot in blue color and
       
    38    diamond markers?
       
    39 
       
    40    a. True
       
    41    #. False
       
    42 
       
    43 Answer: True
       
    44 
       
    45 6. ``scatter(x, y, 'bd')`` creates a scatter plot in blue color with
       
    46    diamond markers.
       
    47 
       
    48    a. True
       
    49    #. False
       
    50 
       
    51 Answer: False
       
    52 
       
    53 7. What statement can be issued to generate a bar chart with 135\
       
    54    :sup:`o` hatched bar filled with white.
       
    55 
       
    56    a. bar(x, y, color='w', hatch='/')
       
    57    #. bar(x, y, color='w', hatch='\\')
       
    58    #. bar(x, y, color='w', hatch='\')
       
    59    #. bar(x, y, color='w', hatch='|')
       
    60 
       
    61 Answer: bar(x, y, color='w', hatch='\\')
       
    62 
       
    63 8. What statement can be issued to generate a bar chart with vertical
       
    64    line hatching.
       
    65 
       
    66    a. bar(x, y, color='w', hatch='/')
       
    67    #. bar(x, y, fill=False, hatch='\\')
       
    68    #. bar(x, y, fill=False, hatch='|')
       
    69    #. bar(x, y, color='w', hatch='\')
       
    70 
       
    71 Answer: bar(x, y, fill=False, hatch='|')
    24 
    72 
    25 Larger Questions
    73 Larger Questions
    26 ----------------
    74 ----------------
    27 
    75 
    28 .. A minimum of 2 questions here (along with answers)
    76 .. A minimum of 2 questions here (along with answers)