Define fig size with subplot while height is deprecated in layout
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
When using height argument in layout, I have a warning telling that this argument is deprecated.
I can use height in plot_ly function directly which is very fine.
However, when using subplot, I did not find a convenient way to specify the total height for the assembled panels. Should subplot accept its own height and width arguments ?
If I understand correctly, subplot uses by default the layout from one of the contained plots. It seems to be the case for width and height but I find it confusing because:
heightis encouraged to be defined outside of thelayoutfunction- it seems counterintuitive that the size of the panels assembly is controled by the size defined in one subpanel
panel1 = plot_ly(x = 1, y = rnorm(100), height = 600, width = 100) %>%
add_trace(type = "violin")
panel2 = plot_ly(x = 1, y = rnorm(100), height = 300, width = 300) %>%
add_trace(type = "violin")
# Size of individual panels are respected
panel1
panel2
# Total figure size uses size of one subpanel (one can use 'which_layout' to control which)
subplot(panel1, panel2)
subplot(panel2, panel1)
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 bei den Einstiegspunkten subplot und plot_ly und prüfe anschließend, wie layout dimensions und which_layout derzeit die Größe der zusammengesetzten Abbildung bestimmen. Kläre, ob subplot height und width unabhängig von seinen Panels akzeptieren sollte, und definiere das erwartete Verhalten bei widersprüchlichen Panel-Dimensionen, bevor du die Änderung vorschlägst.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- r
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100