Add support for captions and subtitles
Offen
Dieses Issue hat noch niemand übernommen.
enhancement
ggplotly
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
This example shows the difference between ggplot and ggplotly objects regarding the use of "labs".
Source: R for Data Science
library(ggplot2)
library(plotly)
p<-ggplot(mpg, aes(displ, hwy)) +
geom_point(aes(color = class)) +
geom_smooth(se = FALSE) +
labs(
title = "Fuel efficiency generally decreases with engine size",
subtitle = "Two seaters (sports cars) are an exception because of their light weight",
caption = "Data from fueleconomy.gov"
);
p # This is ok, a ggplot2 object
g <- ggplotly(p)
g # "labs()" Just showing title (centered) and subtilte & caption are not even showing up
labs() OK

labs() not ok

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
Es wird keine Implementierungsdatei und kein Test genannt. Reproduziere zuerst das bereitgestellte ggplot2- und ggplotly-Beispiel und verfolge dann den Konvertierungspfad für labs(); als erledigt gilt die Aufgabe, wenn das resultierende Diagramm sowohl den Untertitel als auch die Bildunterschrift wie im Quell-ggplot anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100