Data Science Questions and Answers – Plotting in Python

This set of Data Science Multiple Choice Questions & Answers (MCQs) focuses 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
View Answer

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
View Answer

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
View Answer

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
View Answer

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

advertisement
advertisement

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
View Answer

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
View Answer

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

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

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

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
View Answer

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

advertisement

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

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
View Answer

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

advertisement

Sanfoundry Global Education & Learning Series – Data Science.

Here’s the list of Best Books in Data Science.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.