plotly / plotly/plotly.R

Boxplot outliers are shown in black using ggplotly

Open
#1,114 17 comments 6 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

If I create a boxplot in ggplot2 and convert it using ggplotly command, the outliers are outlined in black.
Here is a simple example:

library(ggplot2)
library(plotly)

p <- ggplot(mpg, aes(class, hwy))
g <- p + geom_boxplot(aes(colour = "red"))
ggplotly(g)

ggplot would show this chart:
image

whereas plotly would show this chart:
image

Is this something that can be fixed?

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 R example using ggplot2, geom_boxplot, and ggplotly, then inspect how ggplotly handles the boxplot colour aesthetic and outlier styling. Done means the converted plot no longer outlines outliers in black when the boxplot colour is set to red, while preserving the reported example behavior.

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.