plotly / plotly/plotly.R

geom_title scales become distorted after applying ggplotly

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

Nobody has claimed this yet.

ggplotly
Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

I still don't fully understand how geom_tile calculate the sizes of each tile. However, it seems that the same method is not transferred to ggplotly.

dat <- data.frame(x = c(1,4,10), y = c(2, 5, 3), z = 1:3)
ggplot(dat, aes(x,y,fill=z)) + geom_tile() -> p
p

ggplot

The scales become distorted after applying ggplotly.

ggplotly(p)

plotly

Is there a way to fix the size of each tiles after applying ggplotly?

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 with the supplied R example, comparing the tile sizes produced by geom_tile with the result of ggplotly(p). Trace how the geom_tile scales are transferred through ggplotly; done means the converted plot preserves the relative tile sizes shown by the original ggplot.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.