Outliers not showing up in plotly

79 Views Asked by At

Hi I am using this code to generate a boxplot: enter image description here

However, it is not showing all the data points also not showing up the outliers on the top. I am using this code:

import plotly.express as px

fig = px.box(dataset, y= 'Report_used',hover_name='entity_name')
fig.show()

It needs to be like this:

enter image description here

How can I do this? Thanks

1

There are 1 best solutions below

0
On BEST ANSWER
import plotly.express as px

fig = px.box(dataset,
    y= 'Report_used',
    hover_name='entity_name',
    points='all')
fig.update_traces(pointpos=0)
fig.show()

If you wanted all the points to be on the whisker line:

fig.update_traces(pointpos=0, jitter=0)