Let'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
- Import
seaborn
withsns
alias. - Import
matplotlib.pyplot
withplt
alias. - Import
pandas
withpd
alias. - Set label names
'Population'
(Oy axis) &'Years(2012-2022)'
(Ox axis). - Rotate labels along the Ox axis by 45 degrees.
- Show the plot.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 3
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 5.88Awesome!
Completion rate improved to 5.88
Let'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
- Import
seaborn
withsns
alias. - Import
matplotlib.pyplot
withplt
alias. - Import
pandas
withpd
alias. - Set label names
'Population'
(Oy axis) &'Years(2012-2022)'
(Ox axis). - Rotate labels along the Ox axis by 45 degrees.
- Show the plot.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 3
single
Awesome!
Completion rate improved to 5.88
Let'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
- Import
seaborn
withsns
alias. - Import
matplotlib.pyplot
withplt
alias. - Import
pandas
withpd
alias. - Set label names
'Population'
(Oy axis) &'Years(2012-2022)'
(Ox axis). - Rotate labels along the Ox axis by 45 degrees.
- Show the plot.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!