-1

I have a Seaborn boxplot with 21 boxplots that are getting cut off because of the spacing between the boxplots (see below). How can I reduce the spacing between the boxplots so all 21 boxplots are displayed? enter image description here

I have tried increasing the width of the boxplots but that only causes more of the boxplots to be cut off. I searched for how to reduce the spacing between boxplots but didn't find any answers.

Dan
  • 13
  • 4
  • If I reduce the width to width = 0.7, I can get all 21 boxplots to display, but they are too small to see. I need to reduce the spacing between the boxplots to increase the boxplot width and still have all 21 boxplots displayed. – Dan Aug 04 '23 at 04:19
  • Don't use `hue`. It is not necessary. – Trenton McKinney Aug 04 '23 at 04:30
  • If I remove the hue setting, the legend disappears. How do I add the legend back? – Dan Aug 04 '23 at 04:43
  • I also tried setting the ax.set_xlim(0-2, 21+2); but this causes the individual boxplots to be shifted and not aligned with their tick marker labels. – Dan Aug 04 '23 at 04:45
  • The legend is not necessary because the categories are already on the x-axis. The colors are not necessary because they do not convey any additional information. – Trenton McKinney Aug 04 '23 at 18:14

0 Answers0