render ggplotly graphic - unable to start device
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- R
- Sterne
- 2.7k
- Forks
- 641
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Hello,
I try to plot dynamic graphs in a simple dashboard page, here a simple example:
ui.r part
library(shiny)
library(ggplot2)
library(plotly)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(title = "Basic dashboard"),
dashboardSidebar(),
dashboardBody(
fluidRow(
plotlyOutput("plot3")
)
)
)
and server.r part
server <- function(input, output) {
output$plot3 <- renderPlotly({
g <- ggplot(faithful, aes(x = eruptions, y = waiting)) +
stat_density_2d(aes(fill = ..level..), geom = "polygon") +
xlim(1, 6) + ylim(40, 100)
ggplotly(g)
})
}
This app renders an error : unable to start PNG device.
Do you think is it a problem with my R session and versions of packages ?
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.4 LTSMatrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.solocale:
[1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
[4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
[7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=Cattached base packages:
[1] stats graphics grDevices utils datasets methods baseother attached packages:
[1] maptiles_0.7.0 sf_1.0-8loaded via a namespace (and not attached):
[1] Rcpp_1.0.10 magrittr_2.0.3 units_0.8-0 tidyselect_1.2.0
[5] R6_2.5.1 rlang_1.1.1 fansi_1.0.4 dplyr_1.1.2
[9] tools_4.1.2 grid_4.1.2 KernSmooth_2.23-20 utf8_1.2.3
[13] terra_1.6-17 cli_3.6.1 e1071_1.7-12 DBI_1.1.3
[17] class_7.3-20 tibble_3.2.1 lifecycle_1.0.3 codetools_0.2-18
[21] vctrs_0.6.3 glue_1.6.2 proxy_0.4-27 compiler_4.1.2
[25] pillar_1.9.0 generics_0.1.3 classInt_0.4-8 pkgconfig_2.0.3
Many thanks,
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
Reproduzieren Sie das minimale Shiny-Beispiel anhand der ui.r- und server.r-Snippets, mit Fokus auf renderPlotly, ggplotly und stat_density_2d. Überprüfen Sie die gemeldete Umgebung mit R 4.1.2 und Ubuntu 22.04.4 sowie den PNG-Gerätefehler; das Issue ist gelöst, wenn die Ursache identifiziert ist und das Beispiel ohne diesen Fehler gerendert wird.
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
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100