79521809

Date: 2025-03-20 03:16:00
Score: 0.5
Natty:
Report link

In seaborn 0.13.2, you can overwrite the col/row names after FacetGrid creation, then regenerate titles with set_titles.

import seaborn as sns

att = sns.load_dataset("attention")
g = sns.FacetGrid(att, col="subject", col_wrap=5, height=1.5)
g = g.map(plt.plot, "solutions", "score", marker=".")
g.col_names = ["just", "put", "anything", "you", "want", "here",
                "A", "B", "C", "D", "E", "F", "G", "H", "I" ,"J", "K", "L", "M", "N"]
# g.row_names = ["the", "same", "as", "above"]
g.set_titles(row_template="{row_name}", col_template="{col_name}")
plt.show()

result

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Wing Lee