0% found this document useful (0 votes)
102 views

Visualization Quiz

This document contains a 20 question visualization quiz about Python and Matplotlib. The quiz covers topics like the most popular Python visualization library, how to import and use Matplotlib to create plots, functions for different plot types like line, bar, scatter, and histograms, and concepts like legends, titles, axes, and figure.

Uploaded by

vikas_2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Visualization Quiz

This document contains a 20 question visualization quiz about Python and Matplotlib. The quiz covers topics like the most popular Python visualization library, how to import and use Matplotlib to create plots, functions for different plot types like line, bar, scatter, and histograms, and concepts like legends, titles, axes, and figure.

Uploaded by

vikas_2
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Visualization Quiz

12 IP
* Required

1. Email *

2. Enter your name *

3. 1. The most popular data visualization library in Python is: * 1 point

Mark only one oval.

pip

matinfolib

matplotlib

matpiplib

4. 2. To install matplotlib, the following function will be typed in your command 1 point

prompt. What does “-U”represents? Python –m pip install –U pip *

Mark only one oval.

downloading pip to the latest version

upgrading pip to the latest version

removing pip

upgrading matplotlib to the latest version


5. 3. Which of the following commands is used to import matplotlib for coding? * 1 point

Mark only one oval.

import plt.matplotlib as plot

import plot.matplotlib as pt

import matplotlib.plt as plot

import matplotlib.pyplot as plt

6. 4. To draw a line graph which function is used * 1 point

Mark only one oval.

line

plot

bar

pie

7. 5. The part of chart which identifies different sets of data plotted on plot by 1 point

using different colours is called: *

Mark only one oval.

legends

title

axes

figure

8. 6. barh() function of pyplot is used to draw a * 1 point

Mark only one oval.

Bar Graph

Horizontal Bar Graph

Vertical Bar Graph

Line Graph
9. 7. The function used to plot a Histogram is * 1 point

Mark only one oval.

h()

histogram()

hist()

histograph()

10. 8. Method used to display the plot is 1 point

Mark only one oval.

view()

show()

display()

open()

11. 9. Observe the output figure. Identify the coding for obtaining this output. * 1 point

Mark only one oval.

import matplotlib.pyplot as plt plt.plot([1,2,3],[4,5,1]) plt.show()

import matplotlib.pyplot as plt plt.plot([1,2],[4,5]) plt.show()

import matplotlib.pyplot as plt plt.plot([2,3],[5,1]) plt.show()

import matplotlib.pyplot as plt plt.plot([1,3],[4,1]) plt.show()


12. 10. Read the code and Identify Correct output * 1 point

Mark only one oval.

a. b.

c. d.

Other:
13. 11. Which plot displays the distribution of data based on the five-number 1 point

summary? *

Mark only one oval.

Scatter plot

Line plot

Box plot

Chart plot

14. 12. Which of the following statements is used to create a histogram of ‘step’ 1 point

type with 20 bins? *

Mark only one oval.

plt.hist(x, bins=20,histype=“barstacked”)

plt.hist(x, bins=20)

plt.hist(x, bins=20,histype=“step”)

plt.hist(x, bins=20,histype=hist()

15. 13. Consider the snippet given below: import matplotlib.pyplot as plt 1 point

#arr1,arr2 defined herecolors=[‘r’,‘b’,‘k’,‘g’,‘m’] sizes=[50,120,220,150,80]


plt.scatter(arr1,arr2, c=colors, s=sizes, marker=“s”) With reference to the
above code, what will be the shape of marker? *

Mark only one oval.

square

circle

star

diamond
16. 14. The scatter() function: * 1 point

Mark only one oval.

is a powerful method of creating scatter plots than plot() function

can create line graph

can create bar graph

None of the above

17. 15. Which of the following is an incorrect example of savefig() function? * 1 point

Mark only one oval.

plt.savefig(“bar1.pdf”)

plt.savefig(“bar1.png”)

plt.savefig(“bar1.eps”)

plt.savefig(“bar1.ppt”)

18. 16. Which of the following value is provided by kind keyword for barplot? * 1 point

Mark only one oval.

bar

kde

hexbin

none of the mentioned

19. 17. which one of these is not a valid line style in matplotlib * 1 point

Mark only one oval.

'-'

'--'

'-.'

'<'
20. 18. which graph should be used If we want to find patterns in data? * 1 point

Mark only one oval.

bar

histogram

scatterplots

basemap

21. 19. In box plot, data will be divided in how many parts? * 0 points

Mark only one oval.

as many as we want

22. 20. True or False Statement 1: Histogram have gaps between bars while in bar 1 point

charts bars are adjacent to each other. 2: Histogram presents Quantitative


data and bar chart presents Categorical data. 3: Bars can be reordered in
Histograms. *

Mark only one oval.

False, True, False

False, True, True

True, True, False

True, False,True

This content is neither created nor endorsed by Google.

You might also like