Individual marker styling inconsistent
Personne n'a encore pris cette issue.
- Langage dominant
- R
- Étoiles
- 2.7k
- Forks
- 641
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hi, thank you for making and working on such a wonderful plotting package.
For one of the projects I'm working on, I'm trying to style individual markers, however it's inconsistent when trying to target individual markers. For example I want to make the fourth point as full opacity (1) and larger (15) while the others are at 0.2 and size 10. I would expect "sample4" to be at full opacity, but it's "sample3". Am I doing something wrong?
test_data <- data.frame(
x_data = c(2.8113, 5.8112, 7.3461, 15.5405, 16.3035),
y_data = c(2, 2, 2, 6, 3),
groups = c("group1", "group1", "group2", "group2", "group1"),
samples = c("sample1", "sample2", "sample3", "sample4", "sample5")
)
plotly::plot_ly(
test_data,
x = ~x_data,
y = ~y_data,
mode = "markers",
type = "scatter",
color = ~groups,
text = ~samples,
marker = list(
size = c(10, 10, 10, 15, 10),
opacity = c(0.2, 0.2, 0.2, 1, 0.2)
)
)
produces the following plot
Thanks a lot in advance!
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Reproduisez l’exemple plot_ly fourni dans le dépôt plotly.R et examinez comment les vecteurs marker groupés sont associés aux points tracés. Comparez le style marker affiché avec les vecteurs size et opacity demandés. Le travail est terminé lorsque sample4 reçoit size 15 et opacity 1, tandis que les autres échantillons reçoivent size 10 et opacity 0.2.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- r
- Domaine
- data-visualization
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 45/100