ℹ️ Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0.3 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://seaborn.pydata.org/generated/seaborn.lineplot.html |
| Last Crawled | 2026-04-02 01:55:57 (8 days ago) |
| First Indexed | 2018-07-18 02:17:10 (7 years ago) |
| HTTP Status Code | 200 |
| Meta Title | seaborn.lineplot — seaborn 0.13.2 documentation |
| Meta Description | null |
| Meta Canonical | null |
| Boilerpipe Text | seaborn.
lineplot
(
data
=
None
,
*
,
x
=
None
,
y
=
None
,
hue
=
None
,
size
=
None
,
style
=
None
,
units
=
None
,
weights
=
None
,
palette
=
None
,
hue_order
=
None
,
hue_norm
=
None
,
sizes
=
None
,
size_order
=
None
,
size_norm
=
None
,
dashes
=
True
,
markers
=
None
,
style_order
=
None
,
estimator
=
'mean'
,
errorbar
=
('ci',
95)
,
n_boot
=
1000
,
seed
=
None
,
orient
=
'x'
,
sort
=
True
,
err_style
=
'band'
,
err_kws
=
None
,
legend
=
'auto'
,
ci
=
'deprecated'
,
ax
=
None
,
**
kwargs
)
#
Draw a line plot with possibility of several semantic groupings.
The relationship between
x
and
y
can be shown for different subsets
of the data using the
hue
,
size
, and
style
parameters. These
parameters control what visual semantics are used to identify the different
subsets. It is possible to show up to three dimensions independently by
using all three semantic types, but this style of plot can be hard to
interpret and is often ineffective. Using redundant semantics (i.e. both
hue
and
style
for the same variable) can be helpful for making
graphics more accessible.
See the
tutorial
for more information.
The default treatment of the
hue
(and to a lesser extent,
size
)
semantic, if present, depends on whether the variable is inferred to
represent “numeric” or “categorical” data. In particular, numeric variables
are represented with a sequential colormap by default, and the legend
entries show regular “ticks” with values that may or may not exist in the
data. This behavior can be controlled through various parameters, as
described and illustrated below.
By default, the plot aggregates over multiple
y
values at each value of
x
and shows an estimate of the central tendency and a confidence
interval for that estimate.
Parameters
:
data
pandas.DataFrame
,
numpy.ndarray
, mapping, or sequence
Input data structure. Either a long-form collection of vectors that can be
assigned to named variables or a wide-form dataset that will be internally
reshaped.
x, y
vectors or keys in
data
Variables that specify positions on the x and y axes.
hue
vector or key in
data
Grouping variable that will produce lines with different colors.
Can be either categorical or numeric, although color mapping will
behave differently in latter case.
size
vector or key in
data
Grouping variable that will produce lines with different widths.
Can be either categorical or numeric, although size mapping will
behave differently in latter case.
style
vector or key in
data
Grouping variable that will produce lines with different dashes
and/or markers. Can have a numeric dtype but will always be treated
as categorical.
units
vector or key in
data
Grouping variable identifying sampling units. When used, a separate
line will be drawn for each unit with appropriate semantics, but no
legend entry will be added. Useful for showing distribution of
experimental replicates when exact identities are not needed.
weights
vector or key in
data
Data values or column used to compute weighted estimation.
Note that use of weights currently limits the choice of statistics
to a ‘mean’ estimator and ‘ci’ errorbar.
palette
string, list, dict, or
matplotlib.colors.Colormap
Method for choosing the colors to use when mapping the
hue
semantic.
String values are passed to
color_palette()
. List or dict values
imply categorical mapping, while a colormap object implies numeric mapping.
hue_order
vector of strings
Specify the order of processing and plotting for categorical levels of the
hue
semantic.
hue_norm
tuple or
matplotlib.colors.Normalize
Either a pair of values that set the normalization range in data units
or an object that will map from data units into a [0, 1] interval. Usage
implies numeric mapping.
sizes
list, dict, or tuple
An object that determines how sizes are chosen when
size
is used.
List or dict arguments should provide a size for each unique data value,
which forces a categorical interpretation. The argument may also be a
min, max tuple.
size_order
list
Specified order for appearance of the
size
variable levels,
otherwise they are determined from the data. Not relevant when the
size
variable is numeric.
size_norm
tuple or Normalize object
Normalization in data units for scaling plot objects when the
size
variable is numeric.
dashes
boolean, list, or dictionary
Object determining how to draw the lines for different levels of the
style
variable. Setting to
True
will use default dash codes, or
you can pass a list of dash codes or a dictionary mapping levels of the
style
variable to dash codes. Setting to
False
will use solid
lines for all subsets. Dashes are specified as in matplotlib: a tuple
of
(segment,
gap)
lengths, or an empty string to draw a solid line.
markers
boolean, list, or dictionary
Object determining how to draw the markers for different levels of the
style
variable. Setting to
True
will use default markers, or
you can pass a list of markers or a dictionary mapping levels of the
style
variable to markers. Setting to
False
will draw
marker-less lines. Markers are specified as in matplotlib.
style_order
list
Specified order for appearance of the
style
variable levels
otherwise they are determined from the data. Not relevant when the
style
variable is numeric.
estimator
name of pandas method or callable or None
Method for aggregating across multiple observations of the
y
variable at the same
x
level. If
None
, all observations will
be drawn.
errorbar
string, (string, number) tuple, or callable
Name of errorbar method (either “ci”, “pi”, “se”, or “sd”), or a tuple
with a method name and a level parameter, or a function that maps from a
vector to a (min, max) interval, or None to hide errorbar. See the
errorbar tutorial
for more information.
n_boot
int
Number of bootstraps to use for computing the confidence interval.
seed
int, numpy.random.Generator, or numpy.random.RandomState
Seed or random number generator for reproducible bootstrapping.
orient
“x” or “y”
Dimension along which the data are sorted / aggregated. Equivalently,
the “independent variable” of the resulting function.
sort
boolean
If True, the data will be sorted by the x and y variables, otherwise
lines will connect points in the order they appear in the dataset.
err_style
“band” or “bars”
Whether to draw the confidence intervals with translucent error bands
or discrete error bars.
err_kws
dict of keyword arguments
Additional parameters to control the aesthetics of the error bars. The
kwargs are passed either to
matplotlib.axes.Axes.fill_between()
or
matplotlib.axes.Axes.errorbar()
, depending on
err_style
.
legend
“auto”, “brief”, “full”, or False
How to draw the legend. If “brief”, numeric
hue
and
size
variables will be represented with a sample of evenly spaced values.
If “full”, every group will get an entry in the legend. If “auto”,
choose between brief or full representation based on number of levels.
If
False
, no legend data is added and no legend is drawn.
ci
int or “sd” or None
Size of the confidence interval to draw when aggregating.
Deprecated since version 0.12.0:
Use the new
errorbar
parameter for more flexibility.
ax
matplotlib.axes.Axes
Pre-existing axes for the plot. Otherwise, call
matplotlib.pyplot.gca()
internally.
kwargs
key, value mappings
Other keyword arguments are passed down to
matplotlib.axes.Axes.plot()
.
Returns
:
matplotlib.axes.Axes
The matplotlib axes containing the plot.
See also
scatterplot
Plot data using points.
pointplot
Plot point estimates and CIs using markers and lines.
Examples
The
flights
dataset has 10 years of monthly airline passenger data:
flights
=
sns
.
load_dataset
(
"flights"
)
flights
.
head
()
year
month
passengers
0
1949
Jan
112
1
1949
Feb
118
2
1949
Mar
132
3
1949
Apr
129
4
1949
May
121
To draw a line plot using long-form data, assign the
x
and
y
variables:
may_flights
=
flights
.
query
(
"month == 'May'"
)
sns
.
lineplot
(
data
=
may_flights
,
x
=
"year"
,
y
=
"passengers"
)
Pivot the dataframe to a wide-form representation:
flights_wide
=
flights
.
pivot
(
index
=
"year"
,
columns
=
"month"
,
values
=
"passengers"
)
flights_wide
.
head
()
month
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
year
1949
112
118
132
129
121
135
148
148
136
119
104
118
1950
115
126
141
135
125
149
170
170
158
133
114
140
1951
145
150
178
163
172
178
199
199
184
162
146
166
1952
171
180
193
181
183
218
230
242
209
191
172
194
1953
196
196
236
235
229
243
264
272
237
211
180
201
To plot a single vector, pass it to
data
. If the vector is a
pandas.Series
, it will be plotted against its index:
sns
.
lineplot
(
data
=
flights_wide
[
"May"
])
Passing the entire wide-form dataset to
data
plots a separate line for each column:
sns
.
lineplot
(
data
=
flights_wide
)
Passing the entire dataset in long-form mode will aggregate over repeated values (each year) to show the mean and 95% confidence interval:
sns
.
lineplot
(
data
=
flights
,
x
=
"year"
,
y
=
"passengers"
)
Assign a grouping semantic (
hue
,
size
, or
style
) to plot separate lines
sns
.
lineplot
(
data
=
flights
,
x
=
"year"
,
y
=
"passengers"
,
hue
=
"month"
)
The same column can be assigned to multiple semantic variables, which can increase the accessibility of the plot:
sns
.
lineplot
(
data
=
flights
,
x
=
"year"
,
y
=
"passengers"
,
hue
=
"month"
,
style
=
"month"
)
Use the
orient
parameter to aggregate and sort along the vertical dimension of the plot:
sns
.
lineplot
(
data
=
flights
,
x
=
"passengers"
,
y
=
"year"
,
orient
=
"y"
)
Each semantic variable can also represent a different column. For that, we’ll need a more complex dataset:
fmri
=
sns
.
load_dataset
(
"fmri"
)
fmri
.
head
()
subject
timepoint
event
region
signal
0
s13
18
stim
parietal
-0.017552
1
s5
14
stim
parietal
-0.080883
2
s12
18
stim
parietal
-0.081033
3
s11
18
stim
parietal
-0.046134
4
s10
18
stim
parietal
-0.037970
Repeated observations are aggregated even when semantic grouping is used:
sns
.
lineplot
(
data
=
fmri
,
x
=
"timepoint"
,
y
=
"signal"
,
hue
=
"event"
)
Assign both
hue
and
style
to represent two different grouping variables:
sns
.
lineplot
(
data
=
fmri
,
x
=
"timepoint"
,
y
=
"signal"
,
hue
=
"region"
,
style
=
"event"
)
When assigning a
style
variable, markers can be used instead of (or along with) dashes to distinguish the groups:
sns
.
lineplot
(
data
=
fmri
,
x
=
"timepoint"
,
y
=
"signal"
,
hue
=
"event"
,
style
=
"event"
,
markers
=
True
,
dashes
=
False
)
Show error bars instead of error bands and extend them to two standard error widths:
sns
.
lineplot
(
data
=
fmri
,
x
=
"timepoint"
,
y
=
"signal"
,
hue
=
"event"
,
err_style
=
"bars"
,
errorbar
=
(
"se"
,
2
),
)
Assigning the
units
variable will plot multiple lines without applying a semantic mapping:
sns
.
lineplot
(
data
=
fmri
.
query
(
"region == 'frontal'"
),
x
=
"timepoint"
,
y
=
"signal"
,
hue
=
"event"
,
units
=
"subject"
,
estimator
=
None
,
lw
=
1
,
)
Load another dataset with a numeric grouping variable:
dots
=
sns
.
load_dataset
(
"dots"
)
.
query
(
"align == 'dots'"
)
dots
.
head
()
align
choice
time
coherence
firing_rate
0
dots
T1
-80
0.0
33.189967
1
dots
T1
-80
3.2
31.691726
2
dots
T1
-80
6.4
34.279840
3
dots
T1
-80
12.8
32.631874
4
dots
T1
-80
25.6
35.060487
Assigning a numeric variable to
hue
maps it differently, using a different default palette and a quantitative color mapping:
sns
.
lineplot
(
data
=
dots
,
x
=
"time"
,
y
=
"firing_rate"
,
hue
=
"coherence"
,
style
=
"choice"
,
)
Control the color mapping by setting the
palette
and passing a
matplotlib.colors.Normalize
object:
sns
.
lineplot
(
data
=
dots
.
query
(
"coherence > 0"
),
x
=
"time"
,
y
=
"firing_rate"
,
hue
=
"coherence"
,
style
=
"choice"
,
palette
=
"flare"
,
hue_norm
=
mpl
.
colors
.
LogNorm
(),
)
Or pass specific colors, either as a Python list or dictionary:
palette
=
sns
.
color_palette
(
"mako_r"
,
6
)
sns
.
lineplot
(
data
=
dots
,
x
=
"time"
,
y
=
"firing_rate"
,
hue
=
"coherence"
,
style
=
"choice"
,
palette
=
palette
)
Assign the
size
semantic to map the width of the lines with a numeric variable:
sns
.
lineplot
(
data
=
dots
,
x
=
"time"
,
y
=
"firing_rate"
,
size
=
"coherence"
,
hue
=
"choice"
,
legend
=
"full"
)
Pass a a tuple,
sizes=(smallest,
largest)
, to control the range of linewidths used to map the
size
semantic:
sns
.
lineplot
(
data
=
dots
,
x
=
"time"
,
y
=
"firing_rate"
,
size
=
"coherence"
,
hue
=
"choice"
,
sizes
=
(
.25
,
2.5
)
)
By default, the observations are sorted by
x
. Disable this to plot a line with the order that observations appear in the dataset:
x
,
y
=
np
.
random
.
normal
(
size
=
(
2
,
5000
))
.
cumsum
(
axis
=
1
)
sns
.
lineplot
(
x
=
x
,
y
=
y
,
sort
=
False
,
lw
=
1
)
Use
relplot()
to combine
lineplot()
and
FacetGrid
. This allows grouping within additional categorical variables. Using
relplot()
is safer than using
FacetGrid
directly, as it ensures synchronization of the semantic mappings across facets:
sns
.
relplot
(
data
=
fmri
,
x
=
"timepoint"
,
y
=
"signal"
,
col
=
"region"
,
hue
=
"event"
,
style
=
"event"
,
kind
=
"line"
) |
| Markdown | [ ](https://seaborn.pydata.org/index.html)
- [Installing](https://seaborn.pydata.org/installing.html)
- [Gallery](https://seaborn.pydata.org/examples/index.html)
- [Tutorial](https://seaborn.pydata.org/tutorial.html)
- [API](https://seaborn.pydata.org/api.html)
- [Releases](https://seaborn.pydata.org/whatsnew/index.html)
- [Citing](https://seaborn.pydata.org/citing.html)
- [FAQ](https://seaborn.pydata.org/faq.html)
- [GitHub](https://github.com/mwaskom/seaborn "GitHub")
- [StackOverflow](https://stackoverflow.com/tags/seaborn "StackOverflow")
- [Twitter](https://twitter.com/michaelwaskom "Twitter")
Site Navigation
- [Installing](https://seaborn.pydata.org/installing.html)
- [Gallery](https://seaborn.pydata.org/examples/index.html)
- [Tutorial](https://seaborn.pydata.org/tutorial.html)
- [API](https://seaborn.pydata.org/api.html)
- [Releases](https://seaborn.pydata.org/whatsnew/index.html)
- [Citing](https://seaborn.pydata.org/citing.html)
- [FAQ](https://seaborn.pydata.org/faq.html)
- [GitHub](https://github.com/mwaskom/seaborn "GitHub")
- [StackOverflow](https://stackoverflow.com/tags/seaborn "StackOverflow")
- [Twitter](https://twitter.com/michaelwaskom "Twitter")
- [seaborn.objects.Plot](https://seaborn.pydata.org/generated/seaborn.objects.Plot.html)
- [seaborn.objects.Plot.add](https://seaborn.pydata.org/generated/seaborn.objects.Plot.add.html)
- [seaborn.objects.Plot.scale](https://seaborn.pydata.org/generated/seaborn.objects.Plot.scale.html)
- [seaborn.objects.Plot.facet](https://seaborn.pydata.org/generated/seaborn.objects.Plot.facet.html)
- [seaborn.objects.Plot.pair](https://seaborn.pydata.org/generated/seaborn.objects.Plot.pair.html)
- [seaborn.objects.Plot.layout](https://seaborn.pydata.org/generated/seaborn.objects.Plot.layout.html)
- [seaborn.objects.Plot.label](https://seaborn.pydata.org/generated/seaborn.objects.Plot.label.html)
- [seaborn.objects.Plot.limit](https://seaborn.pydata.org/generated/seaborn.objects.Plot.limit.html)
- [seaborn.objects.Plot.share](https://seaborn.pydata.org/generated/seaborn.objects.Plot.share.html)
- [seaborn.objects.Plot.theme](https://seaborn.pydata.org/generated/seaborn.objects.Plot.theme.html)
- [seaborn.objects.Plot.on](https://seaborn.pydata.org/generated/seaborn.objects.Plot.on.html)
- [seaborn.objects.Plot.plot](https://seaborn.pydata.org/generated/seaborn.objects.Plot.plot.html)
- [seaborn.objects.Plot.save](https://seaborn.pydata.org/generated/seaborn.objects.Plot.save.html)
- [seaborn.objects.Plot.show](https://seaborn.pydata.org/generated/seaborn.objects.Plot.show.html)
- [seaborn.objects.Dot](https://seaborn.pydata.org/generated/seaborn.objects.Dot.html)
- [seaborn.objects.Dots](https://seaborn.pydata.org/generated/seaborn.objects.Dots.html)
- [seaborn.objects.Line](https://seaborn.pydata.org/generated/seaborn.objects.Line.html)
- [seaborn.objects.Lines](https://seaborn.pydata.org/generated/seaborn.objects.Lines.html)
- [seaborn.objects.Path](https://seaborn.pydata.org/generated/seaborn.objects.Path.html)
- [seaborn.objects.Paths](https://seaborn.pydata.org/generated/seaborn.objects.Paths.html)
- [seaborn.objects.Dash](https://seaborn.pydata.org/generated/seaborn.objects.Dash.html)
- [seaborn.objects.Range](https://seaborn.pydata.org/generated/seaborn.objects.Range.html)
- [seaborn.objects.Bar](https://seaborn.pydata.org/generated/seaborn.objects.Bar.html)
- [seaborn.objects.Bars](https://seaborn.pydata.org/generated/seaborn.objects.Bars.html)
- [seaborn.objects.Area](https://seaborn.pydata.org/generated/seaborn.objects.Area.html)
- [seaborn.objects.Band](https://seaborn.pydata.org/generated/seaborn.objects.Band.html)
- [seaborn.objects.Text](https://seaborn.pydata.org/generated/seaborn.objects.Text.html)
- [seaborn.objects.Agg](https://seaborn.pydata.org/generated/seaborn.objects.Agg.html)
- [seaborn.objects.Est](https://seaborn.pydata.org/generated/seaborn.objects.Est.html)
- [seaborn.objects.Count](https://seaborn.pydata.org/generated/seaborn.objects.Count.html)
- [seaborn.objects.Hist](https://seaborn.pydata.org/generated/seaborn.objects.Hist.html)
- [seaborn.objects.KDE](https://seaborn.pydata.org/generated/seaborn.objects.KDE.html)
- [seaborn.objects.Perc](https://seaborn.pydata.org/generated/seaborn.objects.Perc.html)
- [seaborn.objects.PolyFit](https://seaborn.pydata.org/generated/seaborn.objects.PolyFit.html)
- [seaborn.objects.Dodge](https://seaborn.pydata.org/generated/seaborn.objects.Dodge.html)
- [seaborn.objects.Jitter](https://seaborn.pydata.org/generated/seaborn.objects.Jitter.html)
- [seaborn.objects.Norm](https://seaborn.pydata.org/generated/seaborn.objects.Norm.html)
- [seaborn.objects.Stack](https://seaborn.pydata.org/generated/seaborn.objects.Stack.html)
- [seaborn.objects.Shift](https://seaborn.pydata.org/generated/seaborn.objects.Shift.html)
- [seaborn.objects.Boolean](https://seaborn.pydata.org/generated/seaborn.objects.Boolean.html)
- [seaborn.objects.Continuous](https://seaborn.pydata.org/generated/seaborn.objects.Continuous.html)
- [seaborn.objects.Nominal](https://seaborn.pydata.org/generated/seaborn.objects.Nominal.html)
- [seaborn.objects.Temporal](https://seaborn.pydata.org/generated/seaborn.objects.Temporal.html)
- [seaborn.objects.Mark](https://seaborn.pydata.org/generated/seaborn.objects.Mark.html)
- [seaborn.objects.Stat](https://seaborn.pydata.org/generated/seaborn.objects.Stat.html)
- [seaborn.objects.Move](https://seaborn.pydata.org/generated/seaborn.objects.Move.html)
- [seaborn.objects.Scale](https://seaborn.pydata.org/generated/seaborn.objects.Scale.html)
- [seaborn.relplot](https://seaborn.pydata.org/generated/seaborn.relplot.html)
- [seaborn.scatterplot](https://seaborn.pydata.org/generated/seaborn.scatterplot.html)
- [seaborn.lineplot](https://seaborn.pydata.org/generated/seaborn.lineplot.html)
- [seaborn.displot](https://seaborn.pydata.org/generated/seaborn.displot.html)
- [seaborn.histplot](https://seaborn.pydata.org/generated/seaborn.histplot.html)
- [seaborn.kdeplot](https://seaborn.pydata.org/generated/seaborn.kdeplot.html)
- [seaborn.ecdfplot](https://seaborn.pydata.org/generated/seaborn.ecdfplot.html)
- [seaborn.rugplot](https://seaborn.pydata.org/generated/seaborn.rugplot.html)
- [seaborn.distplot](https://seaborn.pydata.org/generated/seaborn.distplot.html)
- [seaborn.catplot](https://seaborn.pydata.org/generated/seaborn.catplot.html)
- [seaborn.stripplot](https://seaborn.pydata.org/generated/seaborn.stripplot.html)
- [seaborn.swarmplot](https://seaborn.pydata.org/generated/seaborn.swarmplot.html)
- [seaborn.boxplot](https://seaborn.pydata.org/generated/seaborn.boxplot.html)
- [seaborn.violinplot](https://seaborn.pydata.org/generated/seaborn.violinplot.html)
- [seaborn.boxenplot](https://seaborn.pydata.org/generated/seaborn.boxenplot.html)
- [seaborn.pointplot](https://seaborn.pydata.org/generated/seaborn.pointplot.html)
- [seaborn.barplot](https://seaborn.pydata.org/generated/seaborn.barplot.html)
- [seaborn.countplot](https://seaborn.pydata.org/generated/seaborn.countplot.html)
- [seaborn.lmplot](https://seaborn.pydata.org/generated/seaborn.lmplot.html)
- [seaborn.regplot](https://seaborn.pydata.org/generated/seaborn.regplot.html)
- [seaborn.residplot](https://seaborn.pydata.org/generated/seaborn.residplot.html)
- [seaborn.heatmap](https://seaborn.pydata.org/generated/seaborn.heatmap.html)
- [seaborn.clustermap](https://seaborn.pydata.org/generated/seaborn.clustermap.html)
- [seaborn.FacetGrid](https://seaborn.pydata.org/generated/seaborn.FacetGrid.html)
- [seaborn.FacetGrid.\_\_init\_\_](https://seaborn.pydata.org/generated/seaborn.FacetGrid.__init__.html)
- [seaborn.FacetGrid.add\_legend](https://seaborn.pydata.org/generated/seaborn.FacetGrid.add_legend.html)
- [seaborn.FacetGrid.apply](https://seaborn.pydata.org/generated/seaborn.FacetGrid.apply.html)
- [seaborn.FacetGrid.despine](https://seaborn.pydata.org/generated/seaborn.FacetGrid.despine.html)
- [seaborn.FacetGrid.facet\_axis](https://seaborn.pydata.org/generated/seaborn.FacetGrid.facet_axis.html)
- [seaborn.FacetGrid.facet\_data](https://seaborn.pydata.org/generated/seaborn.FacetGrid.facet_data.html)
- [seaborn.FacetGrid.map](https://seaborn.pydata.org/generated/seaborn.FacetGrid.map.html)
- [seaborn.FacetGrid.map\_dataframe](https://seaborn.pydata.org/generated/seaborn.FacetGrid.map_dataframe.html)
- [seaborn.FacetGrid.pipe](https://seaborn.pydata.org/generated/seaborn.FacetGrid.pipe.html)
- [seaborn.FacetGrid.refline](https://seaborn.pydata.org/generated/seaborn.FacetGrid.refline.html)
- [seaborn.FacetGrid.savefig](https://seaborn.pydata.org/generated/seaborn.FacetGrid.savefig.html)
- [seaborn.FacetGrid.set](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set.html)
- [seaborn.FacetGrid.set\_axis\_labels](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set_axis_labels.html)
- [seaborn.FacetGrid.set\_titles](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set_titles.html)
- [seaborn.FacetGrid.set\_xlabels](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set_xlabels.html)
- [seaborn.FacetGrid.set\_xticklabels](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set_xticklabels.html)
- [seaborn.FacetGrid.set\_ylabels](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set_ylabels.html)
- [seaborn.FacetGrid.set\_yticklabels](https://seaborn.pydata.org/generated/seaborn.FacetGrid.set_yticklabels.html)
- [seaborn.FacetGrid.tick\_params](https://seaborn.pydata.org/generated/seaborn.FacetGrid.tick_params.html)
- [seaborn.FacetGrid.tight\_layout](https://seaborn.pydata.org/generated/seaborn.FacetGrid.tight_layout.html)
- [seaborn.pairplot](https://seaborn.pydata.org/generated/seaborn.pairplot.html)
- [seaborn.PairGrid](https://seaborn.pydata.org/generated/seaborn.PairGrid.html)
- [seaborn.PairGrid.\_\_init\_\_](https://seaborn.pydata.org/generated/seaborn.PairGrid.__init__.html)
- [seaborn.PairGrid.add\_legend](https://seaborn.pydata.org/generated/seaborn.PairGrid.add_legend.html)
- [seaborn.PairGrid.apply](https://seaborn.pydata.org/generated/seaborn.PairGrid.apply.html)
- [seaborn.PairGrid.map](https://seaborn.pydata.org/generated/seaborn.PairGrid.map.html)
- [seaborn.PairGrid.map\_diag](https://seaborn.pydata.org/generated/seaborn.PairGrid.map_diag.html)
- [seaborn.PairGrid.map\_lower](https://seaborn.pydata.org/generated/seaborn.PairGrid.map_lower.html)
- [seaborn.PairGrid.map\_offdiag](https://seaborn.pydata.org/generated/seaborn.PairGrid.map_offdiag.html)
- [seaborn.PairGrid.map\_upper](https://seaborn.pydata.org/generated/seaborn.PairGrid.map_upper.html)
- [seaborn.PairGrid.pipe](https://seaborn.pydata.org/generated/seaborn.PairGrid.pipe.html)
- [seaborn.PairGrid.savefig](https://seaborn.pydata.org/generated/seaborn.PairGrid.savefig.html)
- [seaborn.PairGrid.set](https://seaborn.pydata.org/generated/seaborn.PairGrid.set.html)
- [seaborn.PairGrid.tick\_params](https://seaborn.pydata.org/generated/seaborn.PairGrid.tick_params.html)
- [seaborn.PairGrid.tight\_layout](https://seaborn.pydata.org/generated/seaborn.PairGrid.tight_layout.html)
- [seaborn.jointplot](https://seaborn.pydata.org/generated/seaborn.jointplot.html)
- [seaborn.JointGrid](https://seaborn.pydata.org/generated/seaborn.JointGrid.html)
- [seaborn.JointGrid.\_\_init\_\_](https://seaborn.pydata.org/generated/seaborn.JointGrid.__init__.html)
- [seaborn.JointGrid.apply](https://seaborn.pydata.org/generated/seaborn.JointGrid.apply.html)
- [seaborn.JointGrid.pipe](https://seaborn.pydata.org/generated/seaborn.JointGrid.pipe.html)
- [seaborn.JointGrid.plot](https://seaborn.pydata.org/generated/seaborn.JointGrid.plot.html)
- [seaborn.JointGrid.plot\_joint](https://seaborn.pydata.org/generated/seaborn.JointGrid.plot_joint.html)
- [seaborn.JointGrid.plot\_marginals](https://seaborn.pydata.org/generated/seaborn.JointGrid.plot_marginals.html)
- [seaborn.JointGrid.refline](https://seaborn.pydata.org/generated/seaborn.JointGrid.refline.html)
- [seaborn.JointGrid.savefig](https://seaborn.pydata.org/generated/seaborn.JointGrid.savefig.html)
- [seaborn.JointGrid.set](https://seaborn.pydata.org/generated/seaborn.JointGrid.set.html)
- [seaborn.JointGrid.set\_axis\_labels](https://seaborn.pydata.org/generated/seaborn.JointGrid.set_axis_labels.html)
- [seaborn.set\_theme](https://seaborn.pydata.org/generated/seaborn.set_theme.html)
- [seaborn.axes\_style](https://seaborn.pydata.org/generated/seaborn.axes_style.html)
- [seaborn.set\_style](https://seaborn.pydata.org/generated/seaborn.set_style.html)
- [seaborn.plotting\_context](https://seaborn.pydata.org/generated/seaborn.plotting_context.html)
- [seaborn.set\_context](https://seaborn.pydata.org/generated/seaborn.set_context.html)
- [seaborn.set\_color\_codes](https://seaborn.pydata.org/generated/seaborn.set_color_codes.html)
- [seaborn.reset\_defaults](https://seaborn.pydata.org/generated/seaborn.reset_defaults.html)
- [seaborn.reset\_orig](https://seaborn.pydata.org/generated/seaborn.reset_orig.html)
- [seaborn.set](https://seaborn.pydata.org/generated/seaborn.set.html)
- [seaborn.set\_palette](https://seaborn.pydata.org/generated/seaborn.set_palette.html)
- [seaborn.color\_palette](https://seaborn.pydata.org/generated/seaborn.color_palette.html)
- [seaborn.husl\_palette](https://seaborn.pydata.org/generated/seaborn.husl_palette.html)
- [seaborn.hls\_palette](https://seaborn.pydata.org/generated/seaborn.hls_palette.html)
- [seaborn.cubehelix\_palette](https://seaborn.pydata.org/generated/seaborn.cubehelix_palette.html)
- [seaborn.dark\_palette](https://seaborn.pydata.org/generated/seaborn.dark_palette.html)
- [seaborn.light\_palette](https://seaborn.pydata.org/generated/seaborn.light_palette.html)
- [seaborn.diverging\_palette](https://seaborn.pydata.org/generated/seaborn.diverging_palette.html)
- [seaborn.blend\_palette](https://seaborn.pydata.org/generated/seaborn.blend_palette.html)
- [seaborn.xkcd\_palette](https://seaborn.pydata.org/generated/seaborn.xkcd_palette.html)
- [seaborn.crayon\_palette](https://seaborn.pydata.org/generated/seaborn.crayon_palette.html)
- [seaborn.mpl\_palette](https://seaborn.pydata.org/generated/seaborn.mpl_palette.html)
- [seaborn.choose\_colorbrewer\_palette](https://seaborn.pydata.org/generated/seaborn.choose_colorbrewer_palette.html)
- [seaborn.choose\_cubehelix\_palette](https://seaborn.pydata.org/generated/seaborn.choose_cubehelix_palette.html)
- [seaborn.choose\_light\_palette](https://seaborn.pydata.org/generated/seaborn.choose_light_palette.html)
- [seaborn.choose\_dark\_palette](https://seaborn.pydata.org/generated/seaborn.choose_dark_palette.html)
- [seaborn.choose\_diverging\_palette](https://seaborn.pydata.org/generated/seaborn.choose_diverging_palette.html)
- [seaborn.despine](https://seaborn.pydata.org/generated/seaborn.despine.html)
- [seaborn.move\_legend](https://seaborn.pydata.org/generated/seaborn.move_legend.html)
- [seaborn.saturate](https://seaborn.pydata.org/generated/seaborn.saturate.html)
- [seaborn.desaturate](https://seaborn.pydata.org/generated/seaborn.desaturate.html)
- [seaborn.set\_hls\_values](https://seaborn.pydata.org/generated/seaborn.set_hls_values.html)
- [seaborn.load\_dataset](https://seaborn.pydata.org/generated/seaborn.load_dataset.html)
- [seaborn.get\_dataset\_names](https://seaborn.pydata.org/generated/seaborn.get_dataset_names.html)
- [seaborn.get\_data\_home](https://seaborn.pydata.org/generated/seaborn.get_data_home.html)
On this page
# seaborn.lineplot[\#](https://seaborn.pydata.org/generated/seaborn.lineplot.html#seaborn-lineplot "Permalink to this heading")
seaborn.lineplot(*data\=None*, *\**, *x\=None*, *y\=None*, *hue\=None*, *size\=None*, *style\=None*, *units\=None*, *weights\=None*, *palette\=None*, *hue\_order\=None*, *hue\_norm\=None*, *sizes\=None*, *size\_order\=None*, *size\_norm\=None*, *dashes\=True*, *markers\=None*, *style\_order\=None*, *estimator\='mean'*, *errorbar\=('ci', 95\)*, *n\_boot\=1000*, *seed\=None*, *orient\='x'*, *sort\=True*, *err\_style\='band'*, *err\_kws\=None*, *legend\='auto'*, *ci\='deprecated'*, *ax\=None*, *\*\*kwargs*)[\#](https://seaborn.pydata.org/generated/seaborn.lineplot.html#seaborn.lineplot "Permalink to this definition")
Draw a line plot with possibility of several semantic groupings.
The relationship between `x` and `y` can be shown for different subsets of the data using the `hue`, `size`, and `style` parameters. These parameters control what visual semantics are used to identify the different subsets. It is possible to show up to three dimensions independently by using all three semantic types, but this style of plot can be hard to interpret and is often ineffective. Using redundant semantics (i.e. both `hue` and `style` for the same variable) can be helpful for making graphics more accessible.
See the [tutorial](https://seaborn.pydata.org/tutorial/relational.html#relational-tutorial) for more information.
The default treatment of the `hue` (and to a lesser extent, `size`) semantic, if present, depends on whether the variable is inferred to represent “numeric” or “categorical” data. In particular, numeric variables are represented with a sequential colormap by default, and the legend entries show regular “ticks” with values that may or may not exist in the data. This behavior can be controlled through various parameters, as described and illustrated below.
By default, the plot aggregates over multiple `y` values at each value of `x` and shows an estimate of the central tendency and a confidence interval for that estimate.
Parameters:
**data**[`pandas.DataFrame`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html#pandas.DataFrame "(in pandas v2.2.0)"), [`numpy.ndarray`](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.26)"), mapping, or sequence
Input data structure. Either a long-form collection of vectors that can be assigned to named variables or a wide-form dataset that will be internally reshaped.
**x, y**vectors or keys in `data`
Variables that specify positions on the x and y axes.
**hue**vector or key in `data`
Grouping variable that will produce lines with different colors. Can be either categorical or numeric, although color mapping will behave differently in latter case.
**size**vector or key in `data`
Grouping variable that will produce lines with different widths. Can be either categorical or numeric, although size mapping will behave differently in latter case.
**style**vector or key in `data`
Grouping variable that will produce lines with different dashes and/or markers. Can have a numeric dtype but will always be treated as categorical.
**units**vector or key in `data`
Grouping variable identifying sampling units. When used, a separate line will be drawn for each unit with appropriate semantics, but no legend entry will be added. Useful for showing distribution of experimental replicates when exact identities are not needed.
**weights**vector or key in `data`
Data values or column used to compute weighted estimation. Note that use of weights currently limits the choice of statistics to a ‘mean’ estimator and ‘ci’ errorbar.
**palette**string, list, dict, or [`matplotlib.colors.Colormap`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.Colormap.html#matplotlib.colors.Colormap "(in Matplotlib v3.8.2)")
Method for choosing the colors to use when mapping the `hue` semantic. String values are passed to [`color_palette()`](https://seaborn.pydata.org/generated/seaborn.color_palette.html#seaborn.color_palette "seaborn.color_palette"). List or dict values imply categorical mapping, while a colormap object implies numeric mapping.
**hue\_order**vector of strings
Specify the order of processing and plotting for categorical levels of the `hue` semantic.
**hue\_norm**tuple or [`matplotlib.colors.Normalize`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.Normalize.html#matplotlib.colors.Normalize "(in Matplotlib v3.8.2)")
Either a pair of values that set the normalization range in data units or an object that will map from data units into a \[0, 1\] interval. Usage implies numeric mapping.
**sizes**list, dict, or tuple
An object that determines how sizes are chosen when `size` is used. List or dict arguments should provide a size for each unique data value, which forces a categorical interpretation. The argument may also be a min, max tuple.
**size\_order**list
Specified order for appearance of the `size` variable levels, otherwise they are determined from the data. Not relevant when the `size` variable is numeric.
**size\_norm**tuple or Normalize object
Normalization in data units for scaling plot objects when the `size` variable is numeric.
**dashes**boolean, list, or dictionary
Object determining how to draw the lines for different levels of the `style` variable. Setting to `True` will use default dash codes, or you can pass a list of dash codes or a dictionary mapping levels of the `style` variable to dash codes. Setting to `False` will use solid lines for all subsets. Dashes are specified as in matplotlib: a tuple of `(segment, gap)` lengths, or an empty string to draw a solid line.
**markers**boolean, list, or dictionary
Object determining how to draw the markers for different levels of the `style` variable. Setting to `True` will use default markers, or you can pass a list of markers or a dictionary mapping levels of the `style` variable to markers. Setting to `False` will draw marker-less lines. Markers are specified as in matplotlib.
**style\_order**list
Specified order for appearance of the `style` variable levels otherwise they are determined from the data. Not relevant when the `style` variable is numeric.
**estimator**name of pandas method or callable or None
Method for aggregating across multiple observations of the `y` variable at the same `x` level. If `None`, all observations will be drawn.
**errorbar**string, (string, number) tuple, or callable
Name of errorbar method (either “ci”, “pi”, “se”, or “sd”), or a tuple with a method name and a level parameter, or a function that maps from a vector to a (min, max) interval, or None to hide errorbar. See the [errorbar tutorial](https://seaborn.pydata.org/tutorial/error_bars.html) for more information.
**n\_boot**int
Number of bootstraps to use for computing the confidence interval.
**seed**int, numpy.random.Generator, or numpy.random.RandomState
Seed or random number generator for reproducible bootstrapping.
**orient**“x” or “y”
Dimension along which the data are sorted / aggregated. Equivalently, the “independent variable” of the resulting function.
**sort**boolean
If True, the data will be sorted by the x and y variables, otherwise lines will connect points in the order they appear in the dataset.
**err\_style**“band” or “bars”
Whether to draw the confidence intervals with translucent error bands or discrete error bars.
**err\_kws**dict of keyword arguments
Additional parameters to control the aesthetics of the error bars. The kwargs are passed either to [`matplotlib.axes.Axes.fill_between()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.fill_between.html#matplotlib.axes.Axes.fill_between "(in Matplotlib v3.8.2)") or [`matplotlib.axes.Axes.errorbar()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.errorbar.html#matplotlib.axes.Axes.errorbar "(in Matplotlib v3.8.2)"), depending on `err_style`.
**legend**“auto”, “brief”, “full”, or False
How to draw the legend. If “brief”, numeric `hue` and `size` variables will be represented with a sample of evenly spaced values. If “full”, every group will get an entry in the legend. If “auto”, choose between brief or full representation based on number of levels. If `False`, no legend data is added and no legend is drawn.
**ci**int or “sd” or None
Size of the confidence interval to draw when aggregating.
Deprecated since version 0.12.0: Use the new `errorbar` parameter for more flexibility.
**ax**[`matplotlib.axes.Axes`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.html#matplotlib.axes.Axes "(in Matplotlib v3.8.2)")
Pre-existing axes for the plot. Otherwise, call [`matplotlib.pyplot.gca()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.gca.html#matplotlib.pyplot.gca "(in Matplotlib v3.8.2)") internally.
**kwargs**key, value mappings
Other keyword arguments are passed down to [`matplotlib.axes.Axes.plot()`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.plot.html#matplotlib.axes.Axes.plot "(in Matplotlib v3.8.2)").
Returns:
[`matplotlib.axes.Axes`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.html#matplotlib.axes.Axes "(in Matplotlib v3.8.2)")
The matplotlib axes containing the plot.
See also
[`scatterplot`](https://seaborn.pydata.org/generated/seaborn.scatterplot.html#seaborn.scatterplot "seaborn.scatterplot")
Plot data using points.
[`pointplot`](https://seaborn.pydata.org/generated/seaborn.pointplot.html#seaborn.pointplot "seaborn.pointplot")
Plot point estimates and CIs using markers and lines.
Examples
The `flights` dataset has 10 years of monthly airline passenger data:
```
flights = sns.load_dataset("flights")
flights.head()
```
| | year | month | passengers |
|---|---|---|---|
| 0 | 1949 | Jan | 112 |
| 1 | 1949 | Feb | 118 |
| 2 | 1949 | Mar | 132 |
| 3 | 1949 | Apr | 129 |
| 4 | 1949 | May | 121 |
To draw a line plot using long-form data, assign the `x` and `y` variables:
```
may_flights = flights.query("month == 'May'")
sns.lineplot(data=may_flights, x="year", y="passengers")
```

Pivot the dataframe to a wide-form representation:
```
flights_wide = flights.pivot(index="year", columns="month", values="passengers")
flights_wide.head()
```
| month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| year | | | | | | | | | | | | |
| 1949 | 112 | 118 | 132 | 129 | 121 | 135 | 148 | 148 | 136 | 119 | 104 | 118 |
| 1950 | 115 | 126 | 141 | 135 | 125 | 149 | 170 | 170 | 158 | 133 | 114 | 140 |
| 1951 | 145 | 150 | 178 | 163 | 172 | 178 | 199 | 199 | 184 | 162 | 146 | 166 |
| 1952 | 171 | 180 | 193 | 181 | 183 | 218 | 230 | 242 | 209 | 191 | 172 | 194 |
| 1953 | 196 | 196 | 236 | 235 | 229 | 243 | 264 | 272 | 237 | 211 | 180 | 201 |
To plot a single vector, pass it to `data`. If the vector is a [`pandas.Series`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.html#pandas.Series "(in pandas v2.2.0)"), it will be plotted against its index:
```
sns.lineplot(data=flights_wide["May"])
```

Passing the entire wide-form dataset to `data` plots a separate line for each column:
```
sns.lineplot(data=flights_wide)
```

Passing the entire dataset in long-form mode will aggregate over repeated values (each year) to show the mean and 95% confidence interval:
```
sns.lineplot(data=flights, x="year", y="passengers")
```

Assign a grouping semantic (`hue`, `size`, or `style`) to plot separate lines
```
sns.lineplot(data=flights, x="year", y="passengers", hue="month")
```

The same column can be assigned to multiple semantic variables, which can increase the accessibility of the plot:
```
sns.lineplot(data=flights, x="year", y="passengers", hue="month", style="month")
```

Use the `orient` parameter to aggregate and sort along the vertical dimension of the plot:
```
sns.lineplot(data=flights, x="passengers", y="year", orient="y")
```

Each semantic variable can also represent a different column. For that, we’ll need a more complex dataset:
```
fmri = sns.load_dataset("fmri")
fmri.head()
```
| | subject | timepoint | event | region | signal |
|---|---|---|---|---|---|
| 0 | s13 | 18 | stim | parietal | \-0.017552 |
| 1 | s5 | 14 | stim | parietal | \-0.080883 |
| 2 | s12 | 18 | stim | parietal | \-0.081033 |
| 3 | s11 | 18 | stim | parietal | \-0.046134 |
| 4 | s10 | 18 | stim | parietal | \-0.037970 |
Repeated observations are aggregated even when semantic grouping is used:
```
sns.lineplot(data=fmri, x="timepoint", y="signal", hue="event")
```

Assign both `hue` and `style` to represent two different grouping variables:
```
sns.lineplot(data=fmri, x="timepoint", y="signal", hue="region", style="event")
```

When assigning a `style` variable, markers can be used instead of (or along with) dashes to distinguish the groups:
```
sns.lineplot(
data=fmri,
x="timepoint", y="signal", hue="event", style="event",
markers=True, dashes=False
)
```

Show error bars instead of error bands and extend them to two standard error widths:
```
sns.lineplot(
data=fmri, x="timepoint", y="signal", hue="event", err_style="bars", errorbar=("se", 2),
)
```

Assigning the `units` variable will plot multiple lines without applying a semantic mapping:
```
sns.lineplot(
data=fmri.query("region == 'frontal'"),
x="timepoint", y="signal", hue="event", units="subject",
estimator=None, lw=1,
)
```

Load another dataset with a numeric grouping variable:
```
dots = sns.load_dataset("dots").query("align == 'dots'")
dots.head()
```
| | align | choice | time | coherence | firing\_rate |
|---|---|---|---|---|---|
| 0 | dots | T1 | \-80 | 0\.0 | 33\.189967 |
| 1 | dots | T1 | \-80 | 3\.2 | 31\.691726 |
| 2 | dots | T1 | \-80 | 6\.4 | 34\.279840 |
| 3 | dots | T1 | \-80 | 12\.8 | 32\.631874 |
| 4 | dots | T1 | \-80 | 25\.6 | 35\.060487 |
Assigning a numeric variable to `hue` maps it differently, using a different default palette and a quantitative color mapping:
```
sns.lineplot(
data=dots, x="time", y="firing_rate", hue="coherence", style="choice",
)
```

Control the color mapping by setting the `palette` and passing a [`matplotlib.colors.Normalize`](https://matplotlib.org/stable/api/_as_gen/matplotlib.colors.Normalize.html#matplotlib.colors.Normalize "(in Matplotlib v3.8.2)") object:
```
sns.lineplot(
data=dots.query("coherence > 0"),
x="time", y="firing_rate", hue="coherence", style="choice",
palette="flare", hue_norm=mpl.colors.LogNorm(),
)
```

Or pass specific colors, either as a Python list or dictionary:
```
palette = sns.color_palette("mako_r", 6)
sns.lineplot(
data=dots, x="time", y="firing_rate",
hue="coherence", style="choice",
palette=palette
)
```

Assign the `size` semantic to map the width of the lines with a numeric variable:
```
sns.lineplot(
data=dots, x="time", y="firing_rate",
size="coherence", hue="choice",
legend="full"
)
```

Pass a a tuple, `sizes=(smallest, largest)`, to control the range of linewidths used to map the `size` semantic:
```
sns.lineplot(
data=dots, x="time", y="firing_rate",
size="coherence", hue="choice",
sizes=(.25, 2.5)
)
```

By default, the observations are sorted by `x`. Disable this to plot a line with the order that observations appear in the dataset:
```
x, y = np.random.normal(size=(2, 5000)).cumsum(axis=1)
sns.lineplot(x=x, y=y, sort=False, lw=1)
```

Use [`relplot()`](https://seaborn.pydata.org/generated/seaborn.relplot.html#seaborn.relplot "seaborn.relplot") to combine [`lineplot()`](https://seaborn.pydata.org/generated/seaborn.lineplot.html#seaborn.lineplot "seaborn.lineplot") and [`FacetGrid`](https://seaborn.pydata.org/generated/seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid"). This allows grouping within additional categorical variables. Using [`relplot()`](https://seaborn.pydata.org/generated/seaborn.relplot.html#seaborn.relplot "seaborn.relplot") is safer than using [`FacetGrid`](https://seaborn.pydata.org/generated/seaborn.FacetGrid.html#seaborn.FacetGrid "seaborn.FacetGrid") directly, as it ensures synchronization of the semantic mappings across facets:
```
sns.relplot(
data=fmri, x="timepoint", y="signal",
col="region", hue="event", style="event",
kind="line"
)
```

© Copyright 2012-2024, [Michael Waskom](https://mwaskom.github.io/).
Created using [Sphinx](https://www.sphinx-doc.org/) and the [PyData Theme](https://pydata-sphinx-theme.readthedocs.io/en/stable/).
[Archive](https://seaborn.pydata.org/generated/seaborn.lineplot.html)
[v0.12](https://seaborn.pydata.org/archive/0.12/index.html) [v0.11](https://seaborn.pydata.org/archive/0.11/index.html) [v0.10](https://seaborn.pydata.org/archive/0.10/index.html) [v0.9](https://seaborn.pydata.org/archive/0.9/index.html)
v0.13.2 |
| Readable Markdown | null |
| Shard | 68 (laksa) |
| Root Hash | 10355827761381095868 |
| Unparsed URL | org,pydata!seaborn,/generated/seaborn.lineplot.html s443 |