Page 361 - Informatics_Practices_Fliipbook_Class12
P. 361

Ans. (i)  plt.xlabel()
                  (ii)  plt.ylabel()

                  (iii)  plt.title()
                  (iv)  plt.savefig()
                  (v)  plt.grid()
                  (vi)  plt.xticks()

                  (vii)  plt.yticks()
                  (viii) plt.scatter()
             117.  Explain the usage of visualization using bar graph and histogram. Explain the methods of matplotlib.pyplot that
                  can be used for plotting them.

             Ans. (i)   Bar graphs, often known as bar charts, are a common method for displaying categorical data. Matplotlib
                      method plt.bar(), can be used for plotting bar graphs which accept as input parameters a list of categories
                      that appear on the x-axis, and the associated counts that appear on the y-axis

                  (ii)   Histograms are popular data visualization tools that offer a graphical depiction of a dataset's distribution.
                      Python includes the function plt.hist() for producing and customizing histograms.


























































                                                                                            Viva Voce Questions  347
   356   357   358   359   360   361   362   363   364   365   366