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.