Rstudio matplotlib error

Hi, I'm trying to plot something in python using matplotlib from:
reticulate + RStudio + matplotlib = :heart: ? - RStudio IDE - RStudio Community
I'm working on rstudio server, But I'm still getting:

UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.

and no plot is shown.
On my local machine, it works fine...


R version 4.1.3 (2022-03-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/


attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] reticulate_1.24 msigdbr_7.5.1 clusterProfiler_4.2.2 SourceFromGithub_0.1.0 devtools_2.4.3
[6] usethis_2.1.5 ggpubr_0.4.0 RColorBrewer_1.1-3 forcats_0.5.1 stringr_1.4.0
[11] dplyr_1.0.8 purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.6
[16] tidyverse_1.3.1 data.table_1.14.2 ggplot2_3.3.5 sp_1.4-7 SeuratObject_4.1.0
[21] Seurat_4.1.0 pheatmap_1.0.12

loaded via a namespace (and not attached):
[1] rappdirs_0.3.3 scattermore_0.8 bit64_4.0.5 knitr_1.39
[5] irlba_2.3.5 rpart_4.1.16 KEGGREST_1.34.0 RCurl_1.98-1.6
[9] generics_0.1.2 BiocGenerics_0.40.0 callr_3.7.0 cowplot_1.1.1
[13] RSQLite_2.2.12 shadowtext_0.1.1 RANN_2.6.1 future_1.24.0
[17] bit_4.0.4 tzdb_0.3.0 enrichplot_1.14.2 spatstat.data_2.2-0
[21] xml2_1.3.3 lubridate_1.8.0 httpuv_1.6.5 assertthat_0.2.1
[25] viridis_0.6.2 xfun_0.30 jquerylib_0.1.4 hms_1.1.1
[29] babelgene_22.3 evaluate_0.15 promises_1.2.0.1 fansi_1.0.3
[33] dbplyr_2.1.1 readxl_1.4.0 igraph_1.3.1 DBI_1.1.2
[37] htmlwidgets_1.5.4 spatstat.geom_2.4-0 stats4_4.1.3 ellipsis_0.3.2
[41] backports_1.4.1 ulimit_0.0-3 deldir_1.0-6 vctrs_0.4.1
[45] Biobase_2.54.0 remotes_2.4.2 here_1.0.1 ROCR_1.0-11
[49] abind_1.4-5 cachem_1.0.6 withr_2.5.0 ggforce_0.3.3
[53] progressr_0.10.0 sctransform_0.3.3 treeio_1.18.1 prettyunits_1.1.1
[57] goftest_1.2-3 cluster_2.1.2 DOSE_3.20.1 ape_5.6-2
[61] lazyeval_0.2.2 crayon_1.5.1 pkgconfig_2.0.3 tweenr_1.0.2
[65] GenomeInfoDb_1.30.1 nlme_3.1-155 pkgload_1.2.4 rlang_1.0.2
[69] globals_0.14.0 lifecycle_1.0.1 miniUI_0.1.1.1 downloader_0.4
[73] modelr_0.1.8 cellranger_1.1.0 rprojroot_2.0.3 polyclip_1.10-0
[77] matrixStats_0.62.0 lmtest_0.9-40 Matrix_1.4-0 aplot_0.1.3
[81] carData_3.0-5 zoo_1.8-10 reprex_2.0.1 ggridges_0.5.3
[85] processx_3.5.3 png_0.1-7 viridisLite_0.4.0 bitops_1.0-7
[89] KernSmooth_2.23-20 Biostrings_2.62.0 blob_1.2.3 qvalue_2.26.0
[93] parallelly_1.31.0 spatstat.random_2.2-0 rstatix_0.7.0 gridGraphics_0.5-1
[97] S4Vectors_0.32.4 ggsignif_0.6.3 scales_1.2.0 memoise_2.0.1
[101] magrittr_2.0.3 plyr_1.8.7 ica_1.0-2 zlibbioc_1.40.0
[105] compiler_4.1.3 scatterpie_0.1.7 fitdistrplus_1.1-8 cli_3.3.0
[109] XVector_0.34.0 listenv_0.8.0 patchwork_1.1.1 pbapply_1.5-0
[113] ps_1.7.0 MASS_7.3-55 mgcv_1.8-39 tidyselect_1.1.2
[117] stringi_1.7.6 yaml_2.3.5 GOSemSim_2.20.0 ggrepel_0.9.1
[121] grid_4.1.3 sass_0.4.1 fastmatch_1.1-3 tools_4.1.3
[125] future.apply_1.8.1 parallel_4.1.3 rstudioapi_0.13 gridExtra_2.3
[129] farver_2.1.0 Rtsne_0.16 ggraph_2.0.5 digest_0.6.29
[133] rgeos_0.5-9 shiny_1.7.1 Rcpp_1.0.8.3 car_3.0-12
[137] broom_0.8.0 later_1.3.0 RcppAnnoy_0.0.19 httr_1.4.2
[141] AnnotationDbi_1.56.2 colorspace_2.0-3 rvest_1.0.2 brio_1.1.3
[145] fs_1.5.2 tensor_1.5 IRanges_2.28.0 splines_4.1.3
[149] uwot_0.1.11 yulab.utils_0.0.4 tidytree_0.3.9 spatstat.utils_2.3-0
[153] graphlayouts_0.8.0 ggplotify_0.1.0 plotly_4.10.0 sessioninfo_1.2.2
[157] xtable_1.8-4 jsonlite_1.8.0 ggtree_3.2.1 tidygraph_1.2.1
[161] ggfun_0.0.6 testthat_3.1.4 R6_2.5.1 pillar_1.7.0
[165] htmltools_0.5.2 mime_0.12 glue_1.6.2 fastmap_1.1.0
[169] BiocParallel_1.28.3 codetools_0.2-18 fgsea_1.20.0 pkgbuild_1.3.1
[173] utf8_1.2.2 bslib_0.3.1 lattice_0.20-45 spatstat.sparse_2.1-1
[177] leiden_0.3.9 GO.db_3.14.0 survival_3.2-13 rmarkdown_2.14
[181] desc_1.4.1 munsell_0.5.0 DO.db_2.9 GenomeInfoDbData_1.2.7
[185] haven_2.5.0 reshape2_1.4.4 gtable_0.3.0 spatstat.core_2.4-2

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.