Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
652 views
in Technique[技术] by (71.8m points)

python - Plotnine Wrap Text in Facet Wrap

I am plotting a faceted plot which has very long labels. I am translating some code from R to python. I am looking to wrap the text of the x-axis over multiple lines. I have shown the R code below.

The R code

q <- ggplot() + ...
q + scale_x_discrete(labels = function(x) str_wrap(x, width = 8)) 

Is there an equivalent for this using plotnine?

question from:https://stackoverflow.com/questions/65891398/plotnine-wrap-text-in-facet-wrap

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...