matplotlib.axes.Axes.set_ylabel#

Axes.set_ylabel(ylabel, fontdict=None, labelpad=None, *, loc=None, **kwargs)[source]#

Set the label for the y-axis.

Parameters:
ylabelstr

The label text.

labelpadfloat, default: rcParams["axes.labelpad"] (default: 4.0)

Spacing in points from the Axes bounding box including ticks and tick labels. If None, the previous value is left as is.

loc{'bottom', 'center', 'top'}, default: rcParams["yaxis.labellocation"] (default: 'center')

The label position. This is a high-level alternative for passing parameters y and horizontalalignment.

Other Parameters:
**kwargsText properties

Text properties control the appearance of the label.

See also

text

Documents the properties supported by Text.

Examples using matplotlib.axes.Axes.set_ylabel#

Bar color demo

Bar color demo

Bar color demo
Bar Label Demo

Bar Label Demo

Bar Label Demo
Stacked bar chart

Stacked bar chart

Stacked bar chart
Grouped bar chart with labels

Grouped bar chart with labels

Grouped bar chart with labels
CSD Demo

CSD Demo

CSD Demo
Fill Between and Alpha

Fill Between and Alpha

Fill Between and Alpha
Hatch-filled histograms

Hatch-filled histograms

Hatch-filled histograms
Hat graph

Hat graph

Hat graph
Mapping marker properties to multivariate data

Mapping marker properties to multivariate data

Mapping marker properties to multivariate data
Psd Demo

Psd Demo

Psd Demo
Scatter plots with custom symbols

Scatter plots with custom symbols

Scatter plots with custom symbols
Scatter Demo2

Scatter Demo2

Scatter Demo2
Stackplots and streamgraphs

Stackplots and streamgraphs

Stackplots and streamgraphs
Contourf Demo

Contourf Demo

Contourf Demo
Creating annotated heatmaps

Creating annotated heatmaps

Creating annotated heatmaps
Tricontour Demo

Tricontour Demo

Tricontour Demo
Tripcolor Demo

Tripcolor Demo

Tripcolor Demo
Triplot Demo

Triplot Demo

Triplot Demo
Aligning Labels

Aligning Labels

Aligning Labels
Axes Demo

Axes Demo

Axes Demo
Axis Label Position

Axis Label Position

Axis Label Position
Resizing axes with constrained layout

Resizing axes with constrained layout

Resizing axes with constrained layout
Resizing axes with tight layout

Resizing axes with tight layout

Resizing axes with tight layout
Figure labels: suptitle, supxlabel, supylabel

Figure labels: suptitle, supxlabel, supylabel

Figure labels: suptitle, supxlabel, supylabel
Invert Axes

Invert Axes

Invert Axes
Secondary Axis

Secondary Axis

Secondary Axis
Figure subfigures

Figure subfigures

Figure subfigures
Multiple subplots

Multiple subplots

Multiple subplots
Plots with different scales

Plots with different scales

Plots with different scales
Box plots with custom fill colors

Box plots with custom fill colors

Box plots with custom fill colors
Boxplots

Boxplots

Boxplots
Box plot vs. violin plot comparison

Box plot vs. violin plot comparison

Box plot vs. violin plot comparison
Violin plot customization

Violin plot customization

Violin plot customization
Using histograms to plot a cumulative distribution

Using histograms to plot a cumulative distribution

Using histograms to plot a cumulative distribution
Some features of the histogram (hist) function

Some features of the histogram (hist) function

Some features of the histogram (hist) function
Producing multiple histograms side by side

Producing multiple histograms side by side

Producing multiple histograms side by side
Using accented text in Matplotlib

Using accented text in Matplotlib

Using accented text in Matplotlib
Date tick labels

Date tick labels

Date tick labels
Legend Demo

Legend Demo

Legend Demo
Mathtext

Mathtext

Mathtext
Multiline

Multiline

Multiline
Rendering math equations using TeX

Rendering math equations using TeX

Rendering math equations using TeX
Simple axes labels

Simple axes labels

Simple axes labels
Text Commands

Text Commands

Text Commands
Color Demo

Color Demo

Color Demo
Line, Poly and RegularPoly Collection with autoscaling

Line, Poly and RegularPoly Collection with autoscaling

Line, Poly and RegularPoly Collection with autoscaling
Ellipse Collection

Ellipse Collection

Ellipse Collection
Dark background style sheet

Dark background style sheet

Dark background style sheet
Make room for ylabel using axes_grid

Make room for ylabel using axes_grid

Make room for ylabel using axes_grid
Parasite Simple

Parasite Simple

Parasite Simple
Parasite Axes demo

Parasite Axes demo

Parasite Axes demo
Parasite axis demo

Parasite axis demo

Parasite axis demo
Ticklabel alignment

Ticklabel alignment

Ticklabel alignment
Simple Axis Direction03

Simple Axis Direction03

Simple Axis Direction03
Simple Axisline

Simple Axisline

Simple Axisline
Anatomy of a figure

Anatomy of a figure

Anatomy of a figure
XKCD

XKCD

XKCD
Pick Event Demo

Pick Event Demo

Pick Event Demo
Pythonic Matplotlib

Pythonic Matplotlib

Pythonic Matplotlib
Plot 2D data on 3D plot

Plot 2D data on 3D plot

Plot 2D data on 3D plot
Create 2D bar graphs in different planes

Create 2D bar graphs in different planes

Create 2D bar graphs in different planes
3D errorbars

3D errorbars

3D errorbars
Lorenz Attractor

Lorenz Attractor

Lorenz Attractor
2D and 3D *Axes* in same *Figure*

2D and 3D Axes in same Figure

2D and 3D *Axes* in same *Figure*
Automatic Text Offsetting

Automatic Text Offsetting

Automatic Text Offsetting
3D scatterplot

3D scatterplot

3D scatterplot
3D surface with polar coordinates

3D surface with polar coordinates

3D surface with polar coordinates
Text annotations in 3D

Text annotations in 3D

Text annotations in 3D
Asinh Demo

Asinh Demo

Asinh Demo
Log Bar

Log Bar

Log Bar
Symlog Demo

Symlog Demo

Symlog Demo
MRI with EEG

MRI with EEG

MRI with EEG
Topographic hillshading

Topographic hillshading

Topographic hillshading
Multiple Yaxis With Spines

Multiple Yaxis With Spines

Multiple Yaxis With Spines
Quick start guide

Quick start guide

Quick start guide
Artist tutorial

Artist tutorial

Artist tutorial
Constrained Layout Guide

Constrained Layout Guide

Constrained Layout Guide
Tight Layout guide

Tight Layout guide

Tight Layout guide
Arranging multiple Axes in a Figure

Arranging multiple Axes in a Figure

Arranging multiple Axes in a Figure
Choosing Colormaps in Matplotlib

Choosing Colormaps in Matplotlib

Choosing Colormaps in Matplotlib
Text in Matplotlib Plots

Text in Matplotlib Plots

Text in Matplotlib Plots