250+ TOP MCQs on Plotting in Python and Answers

Data Science Multiple Choice Questions on “Plotting in Python”.

1. The plot method on Series and DataFrame is just a simple wrapper around ____________
a) gplt.plot()
b) plt.plot()
c) plt.plotgraph()
d) none of the mentioned

Answer: b
Explanation: If the index consists of dates, it calls gcf().autofmt_xdate() to try to format the x-axis nicely.

2. Point out the correct combination with regards to kind keyword for graph plotting.
a) ‘hist’ for histogram
b) ‘box’ for boxplot
c) ‘area’ for area plots
d) all of the mentioned

Answer: d
Explanation: The kind keyword argument of plot() accepts a handful of values for plots other than the default Line plot.

3. Which of the following value is provided by kind keyword for barplot?
a) bar
b) kde
c) hexbin
d) none of the mentioned

Answer: a
Explanation: bar can also be used for barplot.

4. You can create a scatter plot matrix using the __________ method in pandas.tools.plotting.
a) sca_matrix
b) scatter_matrix
c) DataFrame.plot
d) all of the mentioned

Answer: b
Explanation: You can create density plots using the Series/DataFrame.plot.

5. Point out the wrong combination with regards to kind keyword for graph plotting.
a) ‘scatter’ for scatter plots
b) ‘kde’ for hexagonal bin plots
c) ‘pie’ for pie plots
d) none of the mentioned

Answer: b
Explanation: kde is used for density plots.

6. Which of the following plots are used to check if a data set or time series is random?
a) Lag
b) Random
c) Lead
d) None of the mentioned

Answer: a
Explanation: Random data should not exhibit any structure in the lag plot.

7. Plots may also be adorned with error bars or tables.
a) True
b) False

Answer: a
Explanation: There are several plotting functions in pandas.tools.plotting.

8. Which of the following plots are often used for checking randomness in time series?
a) Autocausation
b) Autorank
c) Autocorrelation
d) None of the mentioned

Answer: c
Explanation: If the time series is random, such autocorrelations should be near zero for any and all time-lag separations.

9. __________ plots are used to visually assess the uncertainty of a statistic.
a) Lag
b) RadViz
c) Bootstrap
d) None of the mentioned

Answer: c
Explanation: Resulting plots and histograms are what constitutes the bootstrap plot.

10. Andrews curves allow one to plot multivariate data.
a) True
b) False

Answer: a
Explanation: Curves belonging to samples of the same class will usually be closer together and form larger structures.

Leave a Reply

Your email address will not be published. Required fields are marked *