plotly / plotly/plotly.R

Implement geom_bar_pattern in plotly?

Open
#2,317 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description


The use of geom_bar_pattern appears to be incompatible with plotly. The below graph will print in standard format but fail to print with ggplotly.

plot <- ggplot(mtcars, aes(x=factor(cyl), y=mpg))+
  geom_bar_pattern(aes(y=mpg, pattern=factor(vs)), stat="summary", width=0.5, position=position_dodge(0.7))
   
print(plot)
plotly::ggplotly(plot)

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 using ggplot2::geom_bar_pattern and plotly::ggplotly(plot), then trace how this plot type is converted. Done means the mtcars example renders through ggplotly rather than failing, while preserving the patterned bar and position dodge behavior shown in the issue.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.