xaxis/yaxis in layout of subplots does only apply to first subplot instead of all subplots
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
In https://plotly.com/r/subplots/#customizing-subplot-axes it is described, that xaxis/yaxis apply to all axis in the subplots.
After a figure with subplots is created using the subplot function, its axis properties (title, font, range, grid style, etc.) can be customized using the xaxis and yaxis graph object figure methods. By default, these methods apply to all of the x axes or y axes in the figure. The row and col arguments can be used to control which axes are targeted by the update.
As it can be seen at the example, it only aplies to the first subplot. A shorter example with the use of ggplotly is provided below. There the layout only works for the first row and first column.
ggplot(data = mtcars, aes(x = hp, y = mpg, color = am)) +
geom_point() +
facet_grid(cyl ~ gear, labeller = label_both) +
theme_light()
ggplotly() %>% layout(xaxis = list(tickmode = "auto"), yaxis = list(tickmode = "auto"))
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 mit dem dokumentierten Verhalten der subplot-Achsen und reproduziere das Problem anhand des bereitgestellten Beispiels mit ggplot2, facet_grid, ggplotly() und layout(). Verfolge nach, wie die Layout-Aktualisierungen für xaxis und yaxis angewendet werden, und überprüfe anschließend, dass die Aktualisierungen jede subplot-Achse und nicht nur die erste Zeile und Spalte betreffen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100