To plot the categorical columns to visualize them in python

Viewed 27

I have a categorical column with high number of classes, I want to visualize them in a small graph just to see how much the data is inconsistent, when I am plotting it some values are coming in white while some in the given color as shown below.

Plot of categorical column with 300 different classes, maximum value is 3000 and minimum coube be 0

The code I am using is:

import matplotlib.pyplot as plt
fig = plt.figure(figsize = (10, 5))
plt.bar(keys_departure, values_departure, color ='maroon')
plt.show()

In the figure some lines are coming in 'maroon' color, while some of them are coming in white and there are many grey lines also all over the graph.

I don't want to increase the size and visualize, as I need to add this graph in report also. So I just want to visualize in small box.

0 Answers
Related