Ich versuche, Titel auf Searbon lmplot hinzuzufügen.
ax = plt.axes()
sns.lmplot(x, y, data=df, hue="hue", ax=ax)
ax.set_title("Graph (a)")
plt.show()
Ich habe jedoch festgestellt, dass lmplot
keinen ax
-Parameter hat . Wie kann ich meinem lmplot einen Titel hinzufügen?
versuche dies:
sns.lmplot(x, y, data=df, hue="hue")
ax = plt.gca()
ax.set_title("Graph (a)")
# Create lmplot
lm = sns.lmplot(x, y, data=df, hue="hue", ax=ax)
# Access the figure
fig = lm.fig
# Add a title to the Figure
fig.suptitle("My figtitle", fontsize=12)