plotly / plotly/plotly.R

marker size is incorrect when colouring / grouping variable is non-numeric

Open
#1,877 1 comment 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 first two markers should be small, the next two large. Instead, the first and third are small, and the second and fourth are large:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, marker = list(size = c(5, 5, 10, 10)), color = c("1", "2", "1", "2"))

Grouping on a numeric variable makes the bug disappear:

plot_ly(type = "scatter", mode = "markers", x = 1:4, y = 1:4, marker = list(size = c(5, 5, 10, 10)), color = c(1, 2, 1, 2))

I am running R 3.6.3 on RHEL 7.6 with plotly 4.9.2.1

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

No source file or test is named. Start by running both plot_ly examples in the issue and trace how character versus numeric color grouping is converted into marker data; done when size values stay aligned with their original observations in both cases and regression coverage is added.

Written by the indexing model from the issue text.

Assessment

Tech stack
plotly, r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.