plotly / plotly/plotly.R

unexpected results using ggplotly and geom_dotplot()

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

Nobody has claimed this yet.

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

Description

Hello! Thank you so much for your work on this great package.

I am having some trouble getting dot plots to work with plotly. For example, take a look at the following example from the documentation for geom_dotplot().

library(ggplot2)

p <- ggplot(mtcars, aes(x = factor(cyl), y = mpg)) +
  geom_dotplot(binaxis = "y", stackdir = "center")

p
#> `stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.

Created on 2018-03-07 by the reprex package (v0.2.0).

When I then try to render this with plotly:

library(plotly)
ggplotly(p)

I get a blank plot.

rplot

I am getting lots of weird problems like this with my real data as well.

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 reproducible R example in the issue, using ggplot2's geom_dotplot() and plotly's ggplotly() to compare the source plot with the blank output. Done means the supplied dot plot renders correctly through ggplotly; no repository file or test is identified in the report.

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.