plotly / plotly/plotly.R

ggplotly() does not render empty plots from qplot() grid

Open
#1,293 0 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

Trying to run a 3x3 qplot() grid through ggplotly()—qplot() renders a fine static plot:

library(plotly)

mtcars$gear <- factor(mtcars$gear,levels=c(3,4,5),
  	labels=c("3gears","4gears","5gears")) 
mtcars$am <- factor(mtcars$am,levels=c(0,1),
  	labels=c("Automatic","Manual")) 
mtcars$cyl <- factor(mtcars$cyl,levels=c(4,6,8),
   labels=c("4cyl","6cyl","8cyl")) 

qplot(hp, mpg, data=mtcars, shape=am, color=am, 
           facets=gear~cyl, size=I(3), 
           xlab="Horsepower", ylab="Miles per Gallon")

screen shot 2018-06-25 at 5 50 19 pm

But then when run through ggplotly(), the mid-right plot isn't rendered:

ggplotly(qplot(hp, mpg, data=mtcars, shape=am, color=am, 
           facets=gear~cyl, size=I(3), 
           xlab="Horsepower", ylab="Miles per Gallon"))

screen shot 2018-06-25 at 5 49 49 pm

Is this a bug or expected? Any suggestions on a way to force it to show up?

Thanks.

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

Reproduce the supplied qplot() and ggplotly() example with the mtcars data and its 3x3 gear-by-cylinder facets. Start from the ggplotly() conversion path and compare the static and interactive output; done means every facet, including the empty panel, renders consistently or the behavior is documented as expected.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.