annotation_custom in ggplot not supported by plotly
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 all,
I have a line of code to draw a rectangle, with a gradient color scheme, onto a ggplot figure using annotation_custom. However, this is not supported (and does not appear) when I make my figure interactive with ggplotly.
I am having trouble finding another solution for making this same shape that appears in the static figure in the interactive figure. Is there a way that ggplotly can support custom annotations?
Thank you!
g <- rasterGrob(matrix(c(bluepal), nrow = 1),
width=unit(1,"npc"), height = unit(1,"npc"),
interpolate = TRUE) #make a gradient of blue colors
annotation_custom(g, xmin=2.7, xmax=7.5, ymin=20, ymax=22)
<img width="379" alt="Screen Shot 2021-08-12 at 6 17 45 PM" src="https://user-images.githubusercontent.com/22037535/129281870-c665dea2-0c82-4818-86e2-24d311578342.png">
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
Commencez par reproduire l’exemple R fourni avec rasterGrob, annotation_custom et ggplotly, en comparant le ggplot statique avec le résultat interactif. Déterminez si les annotations personnalisées peuvent être prises en charge et vérifiez que le rectangle en dégradé apparaît dans la figure interactive.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- r
- Domaine
- data-visualization
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100