Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Let's Cope with Axes | Plot Customization
First Dive into seaborn Visualization

bookLet's Cope with Axes

Setting label names:

To set label names, we need to set a plot variable and use:

# g is the plot variable.
g.set(xlabel = 'x_name', ylabel = 'y_name')

X(y)ticks rotation:

To rotate labels, we need to use:

# n is the angle
plt.xticks(rotation = n)
plt.yticks(rotation = n)
Завдання

Swipe to start coding

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set label names 'Population'(Oy axis) & 'Years(2012-2022)'(Ox axis).
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

Рішення

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 3. Розділ 3
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

Suggested prompts:

Сумаризуйте цей розділ

Пояснити код у file

Пояснити, чому file не вирішує завдання

close

Awesome!

Completion rate improved to 5.88

bookLet's Cope with Axes

Свайпніть щоб показати меню

Setting label names:

To set label names, we need to set a plot variable and use:

# g is the plot variable.
g.set(xlabel = 'x_name', ylabel = 'y_name')

X(y)ticks rotation:

To rotate labels, we need to use:

# n is the angle
plt.xticks(rotation = n)
plt.yticks(rotation = n)
Завдання

Swipe to start coding

  1. Import seaborn with sns alias.
  2. Import matplotlib.pyplot with plt alias.
  3. Import pandas with pd alias.
  4. Set label names 'Population'(Oy axis) & 'Years(2012-2022)'(Ox axis).
  5. Rotate labels along the Ox axis by 45 degrees.
  6. Show the plot.

Рішення

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

Як ми можемо покращити це?

Дякуємо за ваш відгук!

close

Awesome!

Completion rate improved to 5.88
Секція 3. Розділ 3
single

single

some-alt