We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sns.relplot()
'x'
'+'
This code is from the seaborn tutorial - An introduction to seaborn.
sns.set_theme(style="ticks", font_scale=1.25) g = sns.relplot( data=penguins, x="bill_length_mm", y="bill_depth_mm", hue="body_mass_g", palette="crest", marker="x", s=100, ) g.set_axis_labels("Bill length (mm)", "Bill depth (mm)", labelpad=10) g.legend.set_title("Body mass (g)") g.figure.set_size_inches(6.5, 4.5) g.ax.margins(.15) g.despine(trim=True)
In the legend, it doesn't show the marker handle.
But when I change to solid markers marker="." and marker="X", it will show the marker handle in legend. See,
marker="."
marker="X"
The text was updated successfully, but these errors were encountered:
Thanks for reporting, hm, looks like the legend artists are inheriting a zero marker edgewidth from somewhere. You can fix it by doing
plt.setp(g.legend.legend_handles, markeredgewidth=1)
Sorry, something went wrong.
Thanks for responding this quick. The solution works!
No branches or pull requests
This code is from the seaborn tutorial - An introduction to seaborn.
In the legend, it doesn't show the marker handle.
But when I change to solid markers
marker="."
andmarker="X"
, it will show the marker handle in legend. See,The text was updated successfully, but these errors were encountered: