Showing the underlying data

Underlying data can be shows using the points arguments. The value of this argument can be of three types – 

  • all for all points
  • outliers for outliers only
  • false for none of the above

Example 1: Passing all as argument

Python3




import plotly.express as px
 
df = px.data.tips()
 
fig = px.box(df, x = "sex", y="total_bill", points="all")
fig.show()


Output:

Example 2:

Python3




import plotly.express as px
 
df = px.data.tips()
 
fig = px.box(df, x = "sex", y="total_bill", points="outliers")
fig.show()


Output: 

Box Plot using Plotly in Python

Plotly is a Python library which is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library.

Similar Reads

Box Plot

A box plot is a demographic representation of numerical data through their quartiles. The end and upper quartiles are represented in box,  while the median (second quartile) is notable by a line inside the box. Plotly.express is convenient,high-ranked interface to plotly which operates on variety of data and produce a easy-to-style figure.Box are much beneficial for comparing the groups of data. Box plot divide approx. 25% of section data into sets which helps ion quickly identifying  values, the dispersion of the data set, and signs of skewness....

Changing Algorithm for Quartiles

...

Showing the underlying data

...

Styling box plot

The algorithm to choose quartiles can also be selected in plotly. It is computed by using linear algorithm by default. However, it provides two more algorithms for doing the same i.e. inclusive and exclusive....