plotly / plotly/plotly.R

Hover information partially disappear when providing color input

Ouverte
#2,311 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

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

Thanks for this package, it is very useful!
When using it, I encountered a kind of weird bug.

The two following plots should be identical and behave in the same way, except that the second one has colored points.

library(plotly)

plot_ly() %>%
  add_markers(
    x = c(1,2,3), y = c(1,2,3), z = c(1,2,3))

plot_ly() %>%
  add_markers(
    x = c(1,2,3), y = c(1,2,3), z = c(1,2,3), color = c(1,2,3))

For the first plot, all the values appear when I hover over all 3 points, as expected.
However, for the second plot, I can only hover over the second point; no information appears when I hover over the first nor the third point. Here are two screenshots that I made with the second plot (the one that has the bug).

image

image

The expected behavior is that the similar type of information would appear for all points.

More generally, I have the impression than when doing a scatter plot with $n$ points, I can only get the hover information of $n-2$ of them if they are colored. For example, the hoverinfo do not appear for the "extreme" points of this plot:

n = 10
plot_ly() %>%
  add_trace(
    x = 1:n, y = 1:n, z = 1:n, color = 1:n, type="scatter3d", mode="markers")

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par exécuter les deux exemples de plot_ly()/add_markers() ainsi que l’exemple scatter3d avec n = 10 afin de reproduire les informations de survol manquantes aux points extrêmes. Comparez le comportement du survol pour les points colorés et non colorés ; c’est terminé lorsque les informations de survol apparaissent systématiquement pour chaque point.

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é
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
32/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.