Ich versuche, ein plotly boxplot in R zu erstellen, die die Ausreißer zeigen tut, und ich fand diesen Link in der offiziellen Seite von plotly: https://plot.ly/ggplot2/box-plots/#outliersEntfernen von Ausreißern aus boxplot und plotly
library(plotly)
set.seed(123)
df <- diamonds[sample(1:nrow(diamonds), size = 1000),]
p <- ggplot(df, aes(cut, price, fill = cut)) +
geom_boxplot(outlier.shape = NA) +
ggtitle("Ignore outliers in ggplot2")
# Need to modify the plotly object and make outlier points have opacity equal
to 0
p <- plotly_build(p)
p$data <- lapply(p$data, FUN = function(x){
x$marker = list(opacity = 0)
return(x)
})
# Create a shareable link to your chart
# Set up API credentials: https://plot.ly/r/getting-started
chart_link = plotly_POST(p, filename="geom_boxplot/outliers")
chart_link
Das Problem ist, dass Auf ihrer Webseite und in meiner Konsole werden immer noch Ausreißer angezeigt. Ist das eine Art Bug?
Wie die Zeit vergeht, Fehler wahrscheinlich repariert. 'geom_boxplot (outlier.shape = NA)' erzeugt für mich ein Box-Plot ohne Ausreißer. – Ufos