plotly / plotly/plotly.R

geom_tile width and height are ignored in ggplotly

Open
#2,116 0 comments 0 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

The height and width parameters of geom_tile are not being taken into account when converted to ggplotly, as shown in the example below.

library(plotly)

X <- data.frame(x = c(1, 2, 1, 2), y = c(1, 1, 2, 2), z = 1:4)
gg <- ggplot(X, aes(x, y)) + geom_tile(aes(fill = z), width = .5, height = .5)

gg
ggplotly(gg)

enter image description here

More information in this stackoverflow post.

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 example from the issue and compare the geom_tile dimensions in ggplot and ggplotly. No file or test is named, so trace the ggplotly conversion path to find where width and height are lost; done means the converted plot preserves both parameters.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.