Shiwani Sabnis
Shiwani Sabnis

Reputation: 3

How to make Boxplot more clear, readable and understandable?

I have a World Covid data csv file with 227 Rows (Countries) and 14 Columns (attributes as in "total cases, deaths, recovery, active cases, test...")

I am trying to create a boxplot in Jupyter, but its not giving me clarity on the output. Below is the code I am trying -

#Multiple Boxplot on one figure #Set Style

*sns.set(style='whitegrid')

fig, ax = plt.subplots(figsize=(10,10))

g = sns.boxplot(data=df, width=0.7)

plt.show()*

Output_1

I tried another very basic method - Its worst then previous one.

df.plot(kind='box', vert=False);

Output_2

Please help :|

Upvotes: 0

Views: 802

Answers (1)

Sharyar Memon
Sharyar Memon

Reputation: 34

I think your problem is the scale of the plot. You are currently seeing that your observations for most of the columns get squeezed together to acommodate the outliers. You can do several things:

  1. Use a log of the values so the scales are not that far apart.
  2. You can also split up the columns into separate box plots to do analysis of them individually.

The definition of "clarity" is also important. What do you mean by clarity?

Upvotes: 1

Related Questions