Would love to see geom_GeomBracket() to be implemented in 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
Hello,
I am a big fan of plotly because of its interactive features and unlike any other normal static plots. I usually use ggplot to visualize my data and then use a ggplotly to make my plot into a plotly interactive plot, but for boxplot with p-value bracket , plotly does not show that feature. I would really appreciated if that feature could be added to plotly as well in the future.
df <- ToothGrowth
df$dose <- as.factor(df$dose)
head(df, 3)
stat.test <- df %>%
group_by(dose) %>%
t_test(len ~ supp) %>%
adjust_pvalue(method = "bonferroni") %>%
add_significance("p.adj")
stat.test
# Create a box plot
bxp <- ggboxplot(
df, x = "dose", y = "len",
color = "supp", palette = c("#00AFBB", "#E7B800")
)
# Add p-values onto the box plots
stat.test <- stat.test %>%
add_xy_position(x = "dose", dodge = 0.8)
bxp + stat_pvalue_manual(
stat.test, label = "p", tip.length = 0
)
#pvalue disappear
ggplotly(bxp + stat_pvalue_manual(
+ stat.test, label = "p", tip.length = 0
+ ))
Warning message:
In geom2trace.default(dots[[1L]][[1L]], dots[[2L]][[1L]], dots[[3L]][[1L]]) :
geom_GeomBracket() has yet to be implemented in plotly.
If you'd like to see this geom implemented,
Please open an issue with your example code at
https://github.com/ropensci/plotly/issues
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
Beginne bei der im Beispiel angezeigten geom2trace.default-Warnung und untersuche, wie ggplotly das übergebene geom_GeomBracket() verarbeitet. Reproduziere das ToothGrowth-Beispiel und überprüfe anschließend, dass die Klammer und die p-Werte im interaktiven Plot erscheinen, ohne dass die Warnung zu nicht implementierten Geoms ausgegeben wird.
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
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100