You are on page 1of 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