Facet labels get cut off when rotated
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
I suspect this is a similar issue to #1224 : when graphs are facetted vertically, and the facet labels rotated to be horizontal, the labels are cut off. (Where there is a legend, it overlaps; where there isn't, it's cut off entirely.)
p <- flights %>%
ggplot(aes(y=origin, x=dest, colour=origin)) +
geom_count() +
facet_grid(name ~.) +
theme(strip.text.y = element_text(angle = 0),
legend.position = "none")
ggplotly(p)


Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the R reproduction in the issue and compare the behavior with issue #1224. Trace the facet-label rendering path used by ggplotly, then verify that horizontally rotated labels are fully visible and do not overlap the legend, both with and without a legend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100