Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Adding the Plot Title | Plot Customization
First Dive into seaborn Visualization
course content

Зміст курсу

First Dive into seaborn Visualization

First Dive into seaborn Visualization

1. Nice to Meet you, seaborn!
2. More and More Plots
3. Plot Customization

Adding the Plot Title

Plotting in the seaborn can be used to create 2 types of plots: FacetGrids and AxesSubplots.

We have learned only plots of the AxesSubplots type, so we will learn how to customize only plots of the corresponding type.

To add the title you need to:

  • Declare a plot variable;
  • Add the title.
12345678910111213141516
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example3.csv') # Creating the countplot and declaring the variable g = sns.countplot(x = 'food', data = df) # Setting the title g.set_title('Food') # Showing the plot plt.show()
copy

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 2
toggle bottom row

Adding the Plot Title

Plotting in the seaborn can be used to create 2 types of plots: FacetGrids and AxesSubplots.

We have learned only plots of the AxesSubplots type, so we will learn how to customize only plots of the corresponding type.

To add the title you need to:

  • Declare a plot variable;
  • Add the title.
12345678910111213141516
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example3.csv') # Creating the countplot and declaring the variable g = sns.countplot(x = 'food', data = df) # Setting the title g.set_title('Food') # Showing the plot plt.show()
copy

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 3. Розділ 2
toggle bottom row

Adding the Plot Title

Plotting in the seaborn can be used to create 2 types of plots: FacetGrids and AxesSubplots.

We have learned only plots of the AxesSubplots type, so we will learn how to customize only plots of the corresponding type.

To add the title you need to:

  • Declare a plot variable;
  • Add the title.
12345678910111213141516
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example3.csv') # Creating the countplot and declaring the variable g = sns.countplot(x = 'food', data = df) # Setting the title g.set_title('Food') # Showing the plot plt.show()
copy

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Plotting in the seaborn can be used to create 2 types of plots: FacetGrids and AxesSubplots.

We have learned only plots of the AxesSubplots type, so we will learn how to customize only plots of the corresponding type.

To add the title you need to:

  • Declare a plot variable;
  • Add the title.
12345678910111213141516
# Importing libraries needed import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Reading the file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/c5b4ea8f-8a30-439f-9625-ddf2effbd9ac/example3.csv') # Creating the countplot and declaring the variable g = sns.countplot(x = 'food', data = df) # Setting the title g.set_title('Food') # Showing the plot plt.show()
copy

Завдання

  1. Import the seaborn with sns alias.
  2. Import the matplotlib.pyplot with plt alias.
  3. Import the pandas with pd alias.
  4. Read the file using df variable.
  5. Create a histplot variable g.
  6. Set the title 'Fish'.
  7. Show the plot.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 3. Розділ 2
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt