Some Python's data visualization tools such as box plots, pie charts and bar charts

Box plots- A box plot is a graphic representation of quantitative variables based on their quartiles, as well as their smallest and largest values. The simplest box plot contains a box and two whiskers. The bottom and top of the box are the first and third quartiles, and the line inside the box is the median. The box area represents the range between the first and third quartiles, which is called the interquartile range (IQR). The ends of the two whiskers indicate the maximum and minimum values of the variable. Box plots can have many variations. For example, complex box plots mark outliers (three or more times the IQR above the third quartile or below the first quartile) and suspected outliers (one and a half or more times the IQR above the third quartile or below the first quartile). On a complex vox plot, if either type of outlier appears, the end of the whisker on the appropriate side changes to one and a half IQR from the corresponding quartile. The end of this whisker is defined as an inner fence, and the third OQR from this quartile is considered as the outer fence. Outliers in this plot are displayed as filled circles and suspected outliers are displayed as unfilled circles. Figs. show an example of simple and complex box plots

Simple Box plot





.
Complex Box plot

We can see that it's super easy to create this plot with Matplotlib. All we need os the function plot. Boxplot(). The first argument is the data points. 
        
       the simple box plot in using pythons --
       values = [1,2,5,6,6,7,7,8,8,8,9,10,20]
      plt.boxplot(values)
      plt.yticks(range(1,21))
      plt.ylabel("value")
      plt.show( )
  • Pie Charts -- It is as well - known as a circle graph. Apoe chart shows information statistics and data in a way that is not difficult to read called "pie-slice" form and the various sizes of slice show how much of an element is in existence. When the slice is big, then it shows of the data was gathered. It is also used to compare value data and the moment some values are represented on a pie chart, then we will be able to view which of the items is the least popular of which is more popular. The best and effective way to make use of a pie chart is when they contain a few components and when the percentages and texts are also involved in order to define the content. By providing additional information, report consumers do not have to guess the meaning and value of each slice. If you choose to use a pie chart, the slices should be a percentage or each slice. If you choose to use a pie chart, the slices should be a percentage of the whole. you choose to use a pie chart, the slices should be a percentage of the whole.    
A Simple Standard Pie Chart








Three Easy Tricks You Probably Didn't Know About Pie Charts in ...
A wedge is used to represent data parts that have the same characteristics and the pie chart control usually decides the data wedge size when it's being compared with other data wedges. Pie charts consist of two popular variations called Doughnut chart and Exploding pie chart. The doughnut chart is almost the same as the standard pie chart just that it consists of a hollow center and the exploding charts the wedges are being obtained from the other wedges.

A pie chart with Matplotliv, we can use the plt.pie( ) function. The auto pact parameter allows us to display the percentage value using the Python string formatting.
 sizes=[25,20,45,10]
 lables=["cats","dogs", "tigers", "goats"]
 plt.pie(sizes, lables=lables, autopct="%.2f")
plt.axes( ).set_aspect("equal")
 plt.show( )
  • Bar chart- bar chart is as well-referred to as a column chart and they are used for comparison of items of different groups. The bars are used to represent the various values of a group and the bar chart makes use of both horizontal bars and vertical bars. When the values to be represented are clearly different and such differences in the bar are been seen by the human eye, then one can decide to make use of a bau chart, but when there are very huge numbers of value to be displayed, then it might be a bit harder to make a comparison between the bars. Most tines, a bar chart is used to represent discrete data and it is as well used to present single data series while the data points that are related are often being grouped in a series.




No comments:

Post a Comment

Algorithm For Loss Function and introduction

Common Loss functions in machine learning- 1)Regression losses  and  2)Classification losses .   There are three types of Regression losses...