Q. From the following ordered set of data:
63, 65, 67, 69, 69, 71, 71, 72, 74, 75, 78, 79, 79, 80, 81, 83
(a) Create a horizontal boxplot
(b) Create a vertical boxplot
(c) Show means in the boxplot
(d) Create boxplot without the box
Answer :-
(a)
import matplotlib.pyplot as plt x=[ 63, 65, 67, 69, 69, 71, 71, 72, 74, 75, 78, 79, 79, 80, 81, 83 ] plt.boxplot( x , vert = 0) plt.show()
Output :-
(b)
import matplotlib.pyplot as plt x=[ 63, 65, 67, 69, 69, 71, 71, 72, 74, 75, 78, 79, 79, 80, 81, 83 ] plt.boxplot( x ) plt.show()
Output :-
(c)
import matplotlib.pyplot as plt x=[ 63, 65, 67, 69, 69, 71, 71, 72, 74, 75, 78, 79, 79, 80, 81, 83 ] plt.boxplot( x , showmeans = True ) plt.show()
Output :-
(d)
import matplotlib.pyplot as plt x=[ 63, 65, 67, 69, 69, 71, 71, 72, 74, 75, 78, 79, 79, 80, 81, 83 ] plt.boxplot( x , showbox = False ) plt.show()
Output :-
Post a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )