0% found this document useful (0 votes)
118 views3 pages

Matplot Quiz Soln

This document contains a 10 question quiz about Matplotlib. Matplotlib is a Python data visualization library that was created by John Hunter. The quiz questions cover topics like creating different types of plots from pandas dataframes using Matplotlib, including horizontal bar charts, stacked area plots, box plots, and histograms. It also asks about the 'kind' keyword argument and wrappers for the plot method in pandas.
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)
118 views3 pages

Matplot Quiz Soln

This document contains a 10 question quiz about Matplotlib. Matplotlib is a Python data visualization library that was created by John Hunter. The quiz questions cover topics like creating different types of plots from pandas dataframes using Matplotlib, including horizontal bar charts, stacked area plots, box plots, and histograms. It also asks about the 'kind' keyword argument and wrappers for the plot method in pandas.
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/ 3

Decodr Technologies

Matplotib Quiz

Q.1 #matplotlib notebook is an example of Matplotlib magic functions.

a) True
b) False

Q.2 Matplotlib was created by


a) John Hunter
b) James Goblin
c) John Butler
d) Cleve Moler

Q.3 Given a pandas dataframe, question, which of the following will create a horizontal bar chart of the data
in question?

a) question.plot(kind='barh')
b) question.plot(type=’bar’)
c) question.plot(kind='bar', type='horizontal')
d) question.plot( type='horizontal')

Q.4 Area plots are by default.

a) stack
b) unstack
c) True
d) None of the above

Q.5 The following code will create a stacked area plot of the data in the pandas dataframe, area_df, with a
transparency value of 0.35?

import matplotlib.pyplot as plt


transparency = 0.35
area_df.plot(kind='area', alpha=transparency, figsize=(20, 10))
plt.title('Plot Title')
plt.ylabel('Vertical Axis Label')
plt.xlabel('Horizontal Axis Label')
plt.show()

a) True
b) False
Q.6 What is the correct combination of function and parameter to create a box plot in Matplotlib??

a) function = plot, and Parameter = kind with value = "boxplot"


b) function = boxplot, and Parameter = kind
c) function = plot, and Parameter = kind with value = "box"
d) function = boxplot, and Parameter = kind with value=]”plot”

Q.7 The easiest way to create a waffle chart in Python is using the Python package, PyWaffle.?

a) True
b) False

Q.8 The following code will create a histogram of a pandas series, series_data, and align the bin edges with
the horizontal tick marks.
count, bin_edges = np.histogram(series_data)
series_data.plot(kind='hist', xticks = bin_edges)

a) True
b) False

Q.9 Point out the incorrect combination with regards to kind keyword for graph plotting.
a) ‘hist’ for histogram
b) ‘boxplot’ for Boxplot
c) ‘area’ for area plot
d) All

Q.10 The plot method on Series and DataFrame is just a simple wrapper around ?

a) gplt.plot()
b) plt.plot()
c) plt.plotgraph()
d) Plt.show()

You might also like