Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
I'm an Artist, that's how I See it! | 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

I'm an Artist, that's how I See it!

We mentioned that the seaborn is based on the matplotlib. That is why all seaborn styles are set using matplotlib functions.

We can use the axes_style() function with no arguments to see which functions are used for the current style.

And then, we have the opportunity to adjust the desired parameters manually and create our unique style!

To change individual style settings manually:

Try this code to look at the customized plot:

123456789101112131415161718192021
import seaborn as sns import numpy as np import matplotlib.pyplot as plt # Generate random data for the line plot x = np.linspace(0, 10, 100) y = np.sin(x) # Set the style of the plot using sns.set_style() sns.set_style('whitegrid', {'axes.facecolor': 'lightgrey', 'grid.color': 'white', 'grid.linewidth': 1}) # Create the line plot using sns.lineplot() sns.lineplot(x = x, y = y, color = 'blue') # Add a title and axis labels to the plot plt.title('Lineplot') plt.xlabel('X-axis') plt.ylabel('Y-axis') # Display the plot plt.show()
copy

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

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

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

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

I'm an Artist, that's how I See it!

We mentioned that the seaborn is based on the matplotlib. That is why all seaborn styles are set using matplotlib functions.

We can use the axes_style() function with no arguments to see which functions are used for the current style.

And then, we have the opportunity to adjust the desired parameters manually and create our unique style!

To change individual style settings manually:

Try this code to look at the customized plot:

123456789101112131415161718192021
import seaborn as sns import numpy as np import matplotlib.pyplot as plt # Generate random data for the line plot x = np.linspace(0, 10, 100) y = np.sin(x) # Set the style of the plot using sns.set_style() sns.set_style('whitegrid', {'axes.facecolor': 'lightgrey', 'grid.color': 'white', 'grid.linewidth': 1}) # Create the line plot using sns.lineplot() sns.lineplot(x = x, y = y, color = 'blue') # Add a title and axis labels to the plot plt.title('Lineplot') plt.xlabel('X-axis') plt.ylabel('Y-axis') # Display the plot plt.show()
copy

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

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

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

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

I'm an Artist, that's how I See it!

We mentioned that the seaborn is based on the matplotlib. That is why all seaborn styles are set using matplotlib functions.

We can use the axes_style() function with no arguments to see which functions are used for the current style.

And then, we have the opportunity to adjust the desired parameters manually and create our unique style!

To change individual style settings manually:

Try this code to look at the customized plot:

123456789101112131415161718192021
import seaborn as sns import numpy as np import matplotlib.pyplot as plt # Generate random data for the line plot x = np.linspace(0, 10, 100) y = np.sin(x) # Set the style of the plot using sns.set_style() sns.set_style('whitegrid', {'axes.facecolor': 'lightgrey', 'grid.color': 'white', 'grid.linewidth': 1}) # Create the line plot using sns.lineplot() sns.lineplot(x = x, y = y, color = 'blue') # Add a title and axis labels to the plot plt.title('Lineplot') plt.xlabel('X-axis') plt.ylabel('Y-axis') # Display the plot plt.show()
copy

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

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

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

We mentioned that the seaborn is based on the matplotlib. That is why all seaborn styles are set using matplotlib functions.

We can use the axes_style() function with no arguments to see which functions are used for the current style.

And then, we have the opportunity to adjust the desired parameters manually and create our unique style!

To change individual style settings manually:

Try this code to look at the customized plot:

123456789101112131415161718192021
import seaborn as sns import numpy as np import matplotlib.pyplot as plt # Generate random data for the line plot x = np.linspace(0, 10, 100) y = np.sin(x) # Set the style of the plot using sns.set_style() sns.set_style('whitegrid', {'axes.facecolor': 'lightgrey', 'grid.color': 'white', 'grid.linewidth': 1}) # Create the line plot using sns.lineplot() sns.lineplot(x = x, y = y, color = 'blue') # Add a title and axis labels to the plot plt.title('Lineplot') plt.xlabel('X-axis') plt.ylabel('Y-axis') # Display the plot plt.show()
copy

Завдання

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set 'whitegrid' style with 'xtick.color' - white, 'ytick.color' - white, 'figure.facecolor' - grey, 'font.family'- ['monospace'].
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

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