1

I tried to use the Seaborn style bar graph for one of my visualizations. To give more context, I had to group my data w.r.t fiscal quarter and customer, and aggregate the total revenue from each of these customers.
I have attached a .png file, which has the data frame and the code that I have written to plot this using sns.

Problem Statement: The vertical bars are not properly stacked. There is a gap between the second and third bar for 2019-Q2. Similarly, for Q3 and Q4. Can somebody help me understand the reason behind this?

enter image description here

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158

1 Answers1

0

the gaps are perhaps because you dont have any party with any amount for that quarter, So seaborn is reading it as zero. and since these are in an order it appreas as a gap in middle.

Bharath
  • 406
  • 2
  • 13
  • Thanks, Bharath. That indeed is the issue. Any idea how to sort this out? I looked up sns.barplot documentation but could not find any argument which deletes zero value bars. – Anand Vamsi Oct 06 '20 at 05:42
  • 1
    @anandvamsi The duplicate is about this specific issue, and the answers explain what can be done. – Trenton McKinney Oct 06 '20 at 06:51