Relational plots और subplots का परिचय

Seaborn के साथ Data Visualization परिचय

Content Team

DataCamp

Quantitative variables से जुड़े प्रश्न

Relational plots

  • Height बनाम weight

Height बनाम weight का scatter plot

Seaborn के साथ Data Visualization परिचय

Quantitative variables से जुड़े प्रश्न

Relational plots

  • Height बनाम weight
  • School absences की संख्या बनाम final grade

Absences की संख्या बनाम final grade का scatter plot

Seaborn के साथ Data Visualization परिचय

Quantitative variables से जुड़े प्रश्न

Relational plots

  • Height बनाम weight
  • School absences की संख्या बनाम final grade
  • GDP बनाम percent literate

GDP बनाम percent literate का scatter plot

Seaborn के साथ Data Visualization परिचय

Hue के साथ scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Subplots के साथ scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

relplot() का परिचय

  • "Relational plots" बनाएँ: scatter plots या line plots

क्यों scatterplot() की जगह relplot()?

  • relplot() एक ही figure में subplots बनाता है
Seaborn के साथ Data Visualization परिचय

scatterplot() बनाम relplot()

scatterplot() का उपयोग

import seaborn as sns
import matplotlib.pyplot as plt

sns.scatterplot(x="total_bill", 
                y="tip", 
                data=tips)

plt.show()

relplot() का उपयोग

import seaborn as sns
import matplotlib.pyplot as plt

sns.relplot(x="total_bill", 
            y="tip", 
            data=tips,
            kind="scatter")

plt.show()
1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Columns में subplots

import seaborn as sns
import matplotlib.pyplot as plt

sns.relplot(x="total_bill", 
            y="tip", 
            data=tips,
            kind="scatter",
            col="smoker")

plt.show()

Columns में smoker subplots वाला scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Rows में subplots

import seaborn as sns
import matplotlib.pyplot as plt

sns.relplot(x="total_bill", 
            y="tip", 
            data=tips,
            kind="scatter",
            row="smoker")

plt.show()

Rows में smoker subplots वाला scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Rows और columns में subplots

import seaborn as sns
import matplotlib.pyplot as plt

sns.relplot(x="total_bill", 
            y="tip", 
            data=tips,
            kind="scatter",
            col="smoker",
            row="time")

plt.show()

Smoker और time के subplots वाला scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Week के दिनों के subgroups

Columns में day subplots वाला scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Columns wrap करना

import seaborn as sns
import matplotlib.pyplot as plt

sns.relplot(x="total_bill", 
            y="tip", 
            data=tips,
            kind="scatter",
            col="day",
            col_wrap=2)

plt.show()

Columns को दो rows में wrap किए day subplots वाला scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

Columns का क्रम तय करना

import seaborn as sns
import matplotlib.pyplot as plt

sns.relplot(x="total_bill", 
            y="tip", 
            data=tips,
            kind="scatter",
            col="day",
            col_wrap=2,
            col_order=["Thur",
                       "Fri",
                       "Sat",
                       "Sun"])

plt.show()

Ordered day subplots वाला scatter plot

1 Waskom, M. L. (2021). seaborn: statistical data visualization. https://seaborn.pydata.org/
Seaborn के साथ Data Visualization परिचय

अभ्यास करते हैं!

Seaborn के साथ Data Visualization परिचय

Preparing Video For Download...