Professional Documents
Culture Documents
Ploting With Pyplot Data Visualization Worksheets1!5!279202323752
Ploting With Pyplot Data Visualization Worksheets1!5!279202323752
SOCIETY’S
(a) matplotlib.pyplot
(b) matplotlib.pip
(c) matplotlib.numpy
(d) matplotlib.plt
(a) pip
(b) matinfolib
(c) matplotlib
(d) matpiplib
Q3. Which of the following commands is used to install matplotlib for coding?
(a) show()
(b) display()
(c) execute()
(d) plot()
Q7. For 2D plotting using a Python library, which library interface is often used ?
(a) seaborn
(b) plotly
(c) matplotlib
(d) matplotlib.pyplot
Q9. Which of the following plotting functions does not plot multiple data series?
Q10. The plot which tells the trend between two graphed variables is the _____
graph/chart.
Q1. A visual representation of the statistic five number summary of a given dataset is
known as _____.
(a) histogram
(b) frequency distribution
(c) boxplot
(d) frequency polygon
Q3. Which shape of marker will be printed in the scatter chart made using following
Code : plt.scatter(x,y,marker=’D’)
Q4. The plot which tells the correlation between two variables which may not be
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
Q9. Raju want to create scatter chart for the given data
X=[1,2,3,4]
Y=[12,23,16,28]
a. Plt.plot(x,y,’o’)
b. Plt.scatter(x,y)
c. Df=pd.DataFrame({‘c1,:x,’c2’:y})
Df.plot(kind=scatter,x=’c1’,y=’c2’)
Q1. When should you use i) bar chart ii) pie chart
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
__________________________________________________________________
____________________________________________________________________
____________________________________________________________________
Q4. Compare bar() and barh() functions.
____________________________________________________________________
_____________________________________________________________________
a. Bar b. Scatter
c. Line d. Pie
Q9. There is no gap between bars in histogram however in bar chart gap is exists.
a. True b. False
a. Bar() b. barh()
c. box() d. plot()
Q11. The order of bars plotted may be different from the order in actual data sequence.
a. True b.False
a. box() b. boxplot()
a. Plt.plot(y,x)
b. Plt.plot(x)
c. Plt.plot(x,y)
Q6. Which attribute of plot() function is used to set the edge color of bar in bar chart?
a. bordercolor b. colorofedge
Q7. Fill in the blank in the given code, if we want to plot a line chart for values of list ‘a’
a=[1,2,3,4,5]
b=[10,20,30,40,50]
plt.plot__________
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________
Name of matplotlib.pyplot)
a. Plt.label(“Amount”) b. Plt.xlabel(“Amount”)
a. histo() b. histogram()
c. hist() d. histtype()
a. Display() b. show()
c. legend() d. legends()
usable
a. Type b. kind
c. kinds d. types
Q7. Mr. Sanjay wants to plot a bar graph for the given set of values of subject on x-axis
and number of students who opted for that subject on y-axis. Complete the code to
perform the following : (i) To plot the bar graph in statement 1 (ii) To display the graph in
statement 2
y=[10,20,30,40]
_____________________ Statement 1
_____________________ Statement 2
____________________________________________________________________
____________________________________________________________________
____________________________________________________________________