Ich habe mich in einer meiner Parzellen darum gekümmert, die Legende neu zu arrangieren. Das folgende Beispiel ilustrates das Problem, das ich zur Zeit habe:Legend in plotly boxplot neu anordnen
library(plotly)
library(data.table)
test <- data.table(NAME = c(rep(x = "b",10),rep(x = "c",10),rep(x = "a",10)), VALUE = sample(0:100,30, replace = T)/100)
plot_ly(test, x = ~NAME, y = ~VALUE, color = ~NAME, type = "box")
Also, wenn ich die Funktion ausführen, was ich bekommen ist eine grafische Darstellung mit einer Legende alphabetisch geordnet („a“, „b“, „c“) und die Boxplots (von links nach rechts) entsprechend der Legende bestellt. Was ich versuche zu erhalten, ist ein Plot mit einer Legende, die der gleichen Reihenfolge folgt wie im Dataset ("b", "c", "a") und den entsprechend geordneten Boxplots.