1

I'm trying to use 'seaborn.histplot()' to show from which of the categorical 'Destination' data has been 'Transported'.

df_train description

sns.histplot(df_train, x='Destination',hue='Transported')

this is the output

as you can see, part of the the histogram is grey and it's doesn't clear how many was transported or not.

I thought it is something to do with Nan values, but after I removed them it stayed the same. I'm expecting to see all the bars colored with orange and blue, what am I doing wrong?

hadromi
  • 11
  • 2
  • You can try `sns.histplot(..., multiple='dodge')` or `multiple='stack'` – JohanC Jan 30 '23 at 22:57
  • 1
    See https://stackoverflow.com/questions/70649224/seaborn-how-to-use-multiple-parameter-in-seaborn-histplot. The grey color is the result of orange and blue overlapping. – Junuxx Jan 30 '23 at 23:05
  • Thank you! 'stack' did it for me, and the other thread explain it all. – hadromi Jan 31 '23 at 21:58

0 Answers0