plotly / plotly/plotly.R

Implementation of facet_wrap(..., dir="v")

Offen
#1,243 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

ggplotly
Vorherrschende Sprache
R
Sterne
2.7k
Forks
641
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

ggplot2 has the dir option that allows facets to be filled by columns, rather than rows. However, it does not display properly in plotly.

library(ggplot2)
library(plotly)

data <- data.frame(
  x = seq(1:100),
  y = sample(1:1000, 100),
  z = factor(sample(1:4, 100, replace = T))
)

plot <- ggplot(data, aes(x, y)) +
  facet_wrap(~ z, dir = "v") +
  geom_point()

plot
ggplotly(plot)

ggplot works properly and fills the facets from top to bottom, left to right.

screen shot 2018-04-21 at 14 23 14

Using the current dev version of plotly, ggplotly doesn't display all the facets, and still orders them from left to right, top to bottom.

screen shot 2018-04-21 at 14 23 07

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, das R-Beispiel des Issues mit facet_wrap(~ z, dir = "v") und ggplotly(plot) auszuführen, und verfolge anschließend, wie ggplotly das Facet-Layout und die Reihenfolge umwandelt. Vergleiche das Ergebnis mit dem Layout von ggplot von oben nach unten und von links nach rechts; als erledigt gilt die Aufgabe, wenn alle Facets in der angeforderten vertikalen Reihenfolge angezeigt werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
r
Bereich
data-visualization
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.