Bug: Colorbar duplicated when specifying color and symbol in marker argument
Open
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 2.7k
- Forks
- 641
- PR merge metrics
- No merged PRs in 30d
Description
Whenever I plot a 3d scatter with color and symbol, the colorbar seems to be duplicated. This issue does not occur when symbol is removed so I believe it is an issue with the combination of the two.
library(tidyverse)
mtcars <- mtcars %>% mutate(make = substr(word(rownames(mtcars), 1), 1, 1), model = word(rownames(mtcars), 2))
pca <- PCAtools::pca(t(mtcars[,c(1:4)]), metadata = mtcars[,c("carb","gear","qsec", "make", "model")])
p <- plot_ly(data = pca$rotated,
x = ~PC1, y = ~PC2, z = ~PC3,
height = 600,
marker = list(color = pca$metadata$qsec,
colorscale = "Jet",
colorbar = list(title = "Test",
y = 0.5, x = 0, len = 0.5)),
symbol = pca$metadata$make)
p
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the provided plot_ly 3D scatter example with both marker color and symbol, then inspect the plot_ly handling of marker and colorbar options. Compare it with the version that omits symbol. Done means the example displays one colorbar with the requested title and positioning.
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
- 42/100