annotation_custom in ggplot not supported by plotly
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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">
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie damit, das bereitgestellte R-Beispiel mit rasterGrob, annotation_custom und ggplotly zu reproduzieren, und vergleichen Sie den statischen ggplot mit dem interaktiven Ergebnis. Bestimmen Sie, ob benutzerdefinierte Annotationen unterstützt werden können, und überprüfen Sie, dass das Verlaufsrechteck in der interaktiven Abbildung erscheint.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100