0% found this document useful (0 votes)
9 views1 page

Sea Histo

SEA HISTO IN DATA VISUALIZATION

Uploaded by

aloky2027i
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Sea Histo

SEA HISTO IN DATA VISUALIZATION

Uploaded by

aloky2027i
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

#histo

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

mart = pd.read_excel(r"C:\Users\Lenovo Y520\Desktop\visual analytics\Visan56\


visan6\supermarket_sales.xlsx")
mart.head()

plt.figure(figsize=(15,5))

#to plot on x-axis or y-axis


#sns.histplot(data=mart, x='Total')
#sns.histplot(data=mart, y='Total')

# change bin width


#sns.histplot(data=mart, x='Total',binwidth=50)
#sns.histplot(data=mart, x='Total',binwidth=150)

#change number of bins and intervals


#sns.histplot(data=mart, x='Total',bins=30)
#sns.histplot(data=mart, x='Total',bins=np.arange(0,1100,50))
#plt.xticks(np.arange(0,1100,50))

# combine with KDE


#sns.histplot(data=mart, x='Total',kde=True)

# use categorical variable in Hue and Stack it using multiple arguments


#sns.histplot(data=mart, x='Total',hue='Payment')
# for stack
#sns.histplot(data=mart, x='Total',hue='Payment', multiple='stack')

# make step/poly plot using element arguementand change the fill


#sns.histplot(data=mart, x='Total',element='step')
#sns.histplot(data=mart, x='Total',element='step', fill='False')
#sns.histplot(data=mart, x='Total',element='poly')
#sns.histplot(data=mart, x='Total', hue='Payment', element='poly')

#Use categorical variable


#sns.histplot(data=mart, x='Payment')
#sns.histplot(data=mart, x='Payment', shrink=0.75)

#sns.histplot(data=mart, x='Total',stat="")
# stat ==> count, density, probability, frequency
#sns.histplot(data=mart, x='Total',stat='probability')

# Bivariate Histogram
#sns.histplot(data=mart, x='Total',y='gross income')

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy