Individual `barpolar` plots get merged into a single plot when using `subplot()`
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- plotly, r
- Bereich
- data-visualization
Rechercherichtung
Beginne mit dem bereitgestellten R reprex und verfolge, wie subplot() die beiden barpolar-plotly-Objekte kombiniert. Vergleiche das generierte subplot layout und die trace assignments für barpolar-Plots und führe dann das reprex aus, um zu überprüfen, dass jede Eingabe in ihrer eigenen Rasterzelle bleibt, anstatt aggregiert zu werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description of the issue
When I try to display any given number of barpolar plots using the subplot() function, plotly only shows one plot that has somehow aggregated all of the data from the individual plots.
Minimal reprex
Code
library(plotly)
# First barpolar plot
plot1 <- plot_ly(type = 'barpolar') %>%
add_trace(
r = c(10, 15, 20, 25, 30),
theta = c("A", "B", "C", "D", "E"),
marker = list(color = c("red", "blue", "green", "purple", "orange")),
name = "Plot 1"
) %>%
layout(title = "Barpolar Plot 1")
# Second barpolar plot
plot2 <- plot_ly(type = 'barpolar') %>%
add_trace(
r = c(5, 10, 15, 20, 25),
theta = c("A", "B", "C", "D", "E"),
marker = list(color = c("cyan", "magenta", "yellow", "gray", "pink")),
name = "Plot 2"
) %>%
layout(title = "Barpolar Plot 2")
# Combine the two plots into a subplot
subplot(plot1, plot2, nrows = 1)
Result
Expected result
Both plots shown individually, in a grid with 1 column and 2 rows.
Show session info
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.1.1
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/Madrid
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[5] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
[9] tidyverse_2.0.0 plotly_4.10.4 ggplot2_3.5.1
loaded via a namespace (and not attached):
[1] gtable_0.3.5 jsonlite_1.8.8 compiler_4.4.1 tidyselect_1.2.1
[5] scales_1.3.0 yaml_2.3.9 fastmap_1.2.0 R6_2.5.1
[9] generics_0.1.3 htmlwidgets_1.6.4 munsell_0.5.1 tzdb_0.4.0
[13] pillar_1.9.0 rlang_1.1.4 utf8_1.2.4 stringi_1.8.4
[17] lazyeval_0.2.2 timechange_0.3.0 viridisLite_0.4.2 cli_3.6.3
[21] withr_3.0.0 magrittr_2.0.3 crosstalk_1.2.1 digest_0.6.36
[25] grid_4.4.1 rstudioapi_0.16.0 hms_1.1.3 lifecycle_1.0.4
[29] vctrs_0.6.5 glue_1.7.0 data.table_1.15.4 fansi_1.0.6
[33] colorspace_2.1-0 httr_1.4.7 tools_4.4.1 pkgconfig_2.0.3
[37] htmltools_0.5.8.1
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus plotly/plotly.R
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
-
save_image Error Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
Alle Issues in plotly/plotly.R
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
r-lib/pkgdepends#485 · 3 Kommentare ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
beginners blocker
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
enviPathR OffenBuild Error Build OK Build Warning policies-accepted pre-review precheck-passed
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 84/100
Bioconductor/BiocContributions#207 · 6 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
datacarpentry/semester-biology#1255 ·