Bestellung im r plotly barchart

Warum bekomme ich die andere Reihenfolge plotly Balkendiagramm als ich definiert in x-und y-Variablen.

E. g.

library(plotly)

plot_ly(
  x = c("giraffes", "orangutans", "monkeys"),
  y = c(20, 14, 23),
  name = "SF Zoo",
  type = "bar"
)

Brauche ich Balkendiagramm-wo sehe ich die Balken in der gleichen Reihenfolge wie x-Variablen (kategoriale) definiert ist. Gibt es irgendeinen trick für?

InformationsquelleAutor martinkabe | 2016-10-20

Schreibe einen Kommentar