1 year ago

#76989

test-img

johnjohn

seaborn.lmplot with single axes labels

What I need should be straighforward but I couldn't find a solution. Say we draw the following seaborn.lmplot:

import seaborn as sns; sns.set_theme(color_codes=True)
tips = sns.load_dataset("tips")
g = sns.lmplot(x="total_bill", y="tip", col="day", hue="day",
               data=tips, col_wrap=2, height=3)

tips

I simply want to have a single label for the x-axis and a single label for the y-axis instead of two as currently.

In other words, that the word 'tip' be printed only one time on the centre left of the graph, and that the word 'total_bill' be printed only one time on the bottom centre of the graph.

How do we do this?

EDIT: there is a similar question here One shared x-axis label for Seaborn FacetGrid subplots (layouts/spacing?) yet it is not elaborated and does not solve my issue.

python

matplotlib

seaborn

axis-labels

facet

0 Answers

Your Answer

Accepted video resources