plotly / plotly/plotly.R

Add option "notch" (and "notchwidth") to geom_boxplot

Open
#1,241 0 comments 1 reaction 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 would like to add notches to boxplots like it is possible in ggplot. The feature has recently been implemented for the plotly API (https://community.plot.ly/t/add-option-notch-to-box-plots/7396/3)

library(plotly)

set.seed(1234)
dat <- data.frame(cond = factor(rep(c("A","B"), each=200)), rating = c(rnorm(200),rnorm(200, mean=.8)))

p <- ggplot(dat, aes(x=cond, y=rating)) + geom_boxplot(notch = TRUE)

# ggplot shows notch
p

# ggplotly does not
ggplotly(p)

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 reproducing the issue's R example with ggplot, geom_boxplot(notch = TRUE), and ggplotly(p), then inspect how plotly.R converts geom_boxplot. Done means ggplotly preserves the boxplot notch and supports notchwidth without losing the existing plot.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Feature
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.