Facet Axis Titles cut off on plotly's chart studio
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
This issue is linked to this community post: https://community.plot.ly/t/ggplotly-renders-different-online-vs-offline/14989
When ggplot creates a facet plot, the labels are shared among the multiple axes. Because Plotly only has titles tied to individual axes, these labels are created using plotly annotations when the ggplot facet is ran through ggplotly
The annotations are aligned to the canvas. The yaxis label has a negative x coordinate, and the xaxis label has a negative y coordinate. The graph shows up fine in rstudio (or in chart creator) where more of the canvas is exposed:

But, when viewing in an iframe, the axis titles get cut off.

Can we find an alternative strategy to deal with axis titles on facet graphs? My first thought is to change the placement of the x and y axes relative to the canvas so there's room for the annotations at a 0 placement.
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 with the linked community post and reproduce a faceted ggplot rendered through ggplotly inside an iframe, comparing it with the RStudio or chart creator view. Investigate how facet axis labels become annotations and define a strategy that keeps both axis titles visible without clipping; done means the titles render fully in the iframe.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100