Skip to content
New issue

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

adjust_text doesn't work well with facets #752

Open
skwalker opened this issue Feb 29, 2024 · 1 comment
Open

adjust_text doesn't work well with facets #752

skwalker opened this issue Feb 29, 2024 · 1 comment
Labels
Reprex Needs a Minimal Reproducible Example

Comments

@skwalker
Copy link

Hi,

First of all, thank you for bring ggplot to python, I love this package :)

I'm having some trouble using adjust_text to make some labels easier to read -- it works very well if you don't plot any facets, but when there is more than 1 facet, it only seems to save the arrow type format in the first facet and then the arrow style/shape gets reset somehow. So for example, it looks something like:

image

This is plotted using ggplot(cluster_corrs, aes(x="i", y="corr", color = "cluster")) + geom_point() + theme_bw() + theme( dpi = 200, legend_position = "none", figure_size=(20, 20)) + geom_text(cluster_corrs.dropna(), aes( label = "label"), adjust_text = {"autoalign": "x", "arrowprops": {"arrowstyle": '-', "color": "black", "lw": 0.2}}, color = "black", size = 8) + facet_wrap("~ cluster")

Is there any way to fix this? (I tried to search similar issues, but couldn't find anything, sorry if this is a dupe). I'm currently using plotnine v0.13.0 (and matplotlib 3.8.2).

Thanks,
Sarah

@has2k1
Copy link
Owner

has2k1 commented Apr 25, 2024

I could not reproduce this.

@has2k1 has2k1 added the Reprex Needs a Minimal Reproducible Example label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reprex Needs a Minimal Reproducible Example
Projects
None yet
Development

No branches or pull requests

2 participants