other-type-of-plots/questions.rst
changeset 522 d33698326409
parent 521 88a01948450d
child 523 54bdda4aefa5
equal deleted inserted replaced
521:88a01948450d 522:d33698326409
     1 Objective Questions
       
     2 -------------------
       
     3 
       
     4 .. A mininum of 8 questions here (along with answers)
       
     5 
       
     6 1. What is a log-log chart?
       
     7 
       
     8    a. A straight line graph
       
     9    #. A graph on the logarithmic scale
       
    10    #. A graph on the logarithmic scale with different scales for x and
       
    11       y axes
       
    12    #. A graph in which x axis is represented in logarithmic scale.
       
    13 
       
    14 Answer: A graph on the logarithmic scale with different scales for x
       
    15  	and y axes
       
    16 
       
    17 2. We have two lists with us ``years`` and ``profit``, what statement
       
    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.
       
    20 
       
    21 Answer: pie(profit, labels=years)
       
    22 
       
    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='|')
       
    72 
       
    73 Larger Questions
       
    74 ----------------
       
    75 
       
    76 .. A minimum of 2 questions here (along with answers)
       
    77 
       
    78 1. Plot a log-log chart of the equation y=4*x\ :sup:`2` + 3*x for x
       
    79    from -50 to 50.
       
    80 
       
    81 2. Plot a bar chart which is filled with white color and which is
       
    82    hatched with 135\ :sup:`o` slanting lines for the data given in the
       
    83    `file(company A data) <company-a-data.txt>`_ which has years and
       
    84    profit percentage for each year.
       
    85