Search code examples
pythonseaborn

Why seaborn shows so big intervals


I have dataset where min = 0, and max = 50,6. When I plot distributions of data seaborn plost data from 0 to 400. Why?! I thought tah seaborn shows interval from 0 to 50.6

command:

sns.displot(june_df['Продолжительность погрузки, мин'], kde=True)

and I got this: enter image description here


Solution

  • Now I am used this solution:

    import matplotlib.pyplot as plt
    import seaborn as sns
    
    data = june_df['Продолжительность погрузки, мин'] 
    
    fig, ax = plt.subplots()
    sns.histplot(data, ax=ax)  # distplot is deprecate and replaced by histplot
    ax.set_xlim(0,51)
    ax.set_xticks(range(0,51))
    plt.show()
    

    enter image description here