plotly / plotly/plotly.R

Facet labels get cut off when rotated

Open
#1,594 3 comments 2 reactions 0 assignees View on GitHub

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)

スクリーンショット 2019-08-08 午後6 09 23
スクリーンショット 2019-08-08 午後6 09 45

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.