0% found this document useful (0 votes)
622 views2 pages

Data Visualization MCQs

The document contains 30 multiple choice questions related to data visualization and matplotlib functions. Some key questions addressed include functions for plotting different chart types like line plots, bar charts, histograms; formatting aspects like color, line style, legends; and installing and importing matplotlib.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
622 views2 pages

Data Visualization MCQs

The document contains 30 multiple choice questions related to data visualization and matplotlib functions. Some key questions addressed include functions for plotting different chart types like line plots, bar charts, histograms; formatting aspects like color, line style, legends; and installing and importing matplotlib.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DA TA V ISUA LI ZA TION

MULTIPLE CHOICE QUESTIONS


1. Which of the following methods should be employed in the code to display a plot( )?
(A) show( ) (B) display( )
(C) execute( ) (D) plot( )

2. Which of the following is an incorrect example of savefig( ) function?


(A) plt.savefig("bar1.pdf") (B) plt.savefig("bar1.png")
(C) plt.savefig("bar1.eps") (D) plt.savefig("bar1.ppt")

3. Which of the following is used to produce Dashed Line in a Line Chart?


(A) – (B) – –
(C) – . (D) :

4. Which argument is used to change the color of the border of bars in Histogram?
(A) edgecolor (B) color
(C) colour (D) barcolor

5. In "Interactive Tool Bar", which of the following is used to configure spacing in subplots?
(A) (B)
(C) (D)

6. The axes of a plot can be labelled using ________ and __________?


(A) label( ) and plot( ) (B) xlabel( ) and ylabel( )
(C) bar( ) and hist( ) (D) show( ) and savefig( )

7. Which of the following function is used to create a line chart?


(A) plot( ) (B) line( )
(C) chart( ) (D) plotline( )

8. The color code 'b' represents which of the following color?


(A) black (B) blue
(C) brown (D) green

9. Which of the following is used to create a Horizontal Bar Chart?


(A) bar( ) (B) barh( )
(C) hbar( ) (D) hori_bar( )

10. The data points plotted on a graph are called __________?


(A) points (B) pointers
(C) marks (D) markers

11. Which argument must be set with plotting functions for legend( ) to display the legends?
(A) data (B) label
(C) name (D) sequence

12. Which argument of bar( ) is used to set the thickness of bar?


(A) thick (B) thickness
(C) width (D) barwidth

13. Which of the following statements generates an error?


(A) import matplotlib (B) import matplotlib.pyplot
(C) import matplotlib.pyplot as plt (D) import pyplot from matplotilb

14. Which of the following statement is true in respect of installing matplotlib?


(A) python install matplotlib (B) pip install matplotilb
(C) install pip matplotlib (D) install python matpliotlib

15. Any component that is available on a figure can be called as _____________?


(A) Axes (B) Artist
(C) Label (D) Title
2

16. Which of the following is the required statement to use arange( ) function?
(A) import matplotlib.pyplot as plt (B)import numpy as np
(C) import pandas as pd (D) None of the above

17. Which of the following is used for the Tri_Up Marker while generating a line plot?
(A) v (B) <
(C) ^ (D) None of the above

18. Which of the following function is useful, while generating multiple plots?
(A) subplot( ) (B) multplot( )
(C) sub_plot( ) (D) mult_plot( )

19. Which of the following is the attribute used to change the color of bars in a Bar Chart?
(A) colour (B) color
(C) clr (D) colours

20. Which of the following is used to generate a figure having bar chart with multiple bars?
(A) barm( ) (B) bar( )
(C) barh( ) (D) mbar( )

21. Statement1: The default number of bars in a histogram is 10,


Statement2: Bydefault, the bars in a histogram will be separated by a different color other than bar color
(A) Statement 1 is True, but Statement2 is False
(B) Statement 2 is True, but Statement1 is False
(C) Both Statements are True
(D) Both Statements are False

22. Which statement(s) among the following generates an error?


(A) import matplotlib.pyplot as plt (B) import matplotlib.pyplot
(C) import pyplot from matplotlib (D) from matplotlib import pyplot

23. Which of the following are used to generate equally spaced numeric sequence in NumPy?
(A) empty( ) (B) linspace( )
(C) arange( ) (D) legend( )

24. The style abbreviation "-" is used for producing ____________?


(A) Dashed Line (B) Dotted Line
(C) Solid Line (D) Dash Dot Line

25. Which argument is used to change the color of the bars in Bar Chart?
(A) edgecolor (B) color
(C) colour (D) barcolor

26. What is rule of thumb in producing number of bars in Histogram?


(A) 01 (B) 8
(C) 100 (D) 10

27. Which of the following are true in respect of Histogram?


(A) Range = Maximum Value - Minimum Value
(B) Width of Bin = Range / No. of Bins
(C) Intervals are Left Open Except last interval
(D) Intervals are Right Open except last interval

28. Which of the following function is used to save plot to disk?


(A) save( ) (B) figsave( )
(C) savefig( ) (D) SaveFig( )

29. For which of the following, a direct function is not available in Python?
(A) To plot Horizontal Bars in Bar Chart
(B) To plot Pie Chart
(C) To Plot Multiple Bar Chart
(D) To Plot Line Chart

30. Which function is used to display grid lines in a plot?


(A) grid( ) (B) chexlines( )
(C) gridlines( ) (D) plotlines( )

You might also like