Open kaizen89 opened 5 months ago
I tried multiple values for coord_fix_ratio but it does not change the aspect of the plot.
coord_fix_ratio
GiottoVisuals::spatFeatPlot2D(xenium_gobj, expression_values = 'raw',show_plot = T, feats = "CD3E", cow_n_col = 1, point_size = 1, coord_fix_ratio = 0.5)
However, using coord_fix_ratio inside GiottoVisuals::spatFeatPlot2D_single does behave as expected, so I suspect it is related to cowplot.
GiottoVisuals::spatFeatPlot2D_single
cowplot
R version 4.1.1 (2021-08-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.6 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1 locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] Giotto_4.0.8 GiottoClass_0.3.1 dplyr_1.1.4 Seurat_5.1.0 SeuratObject_5.0.2 sp_2.1-4 ggplot2_3.5.1 patchwork_1.2.0 loaded via a namespace (and not attached): [1] backports_1.5.0 spam_2.10-0 circlize_0.4.16 systemfonts_1.1.0 plyr_1.8.9 igraph_2.0.3 lazyeval_0.2.2 [8] splines_4.1.1 RcppHNSW_0.6.0 RApiSerialize_0.1.3 listenv_0.9.1 scattermore_1.2 digest_0.6.35 htmltools_0.5.8.1 [15] magick_2.8.3 fansi_1.0.6 magrittr_2.0.3 checkmate_2.3.1 tensor_1.5 paletteer_1.6.0 cluster_2.1.2 [22] ROCR_1.0-11 globals_0.16.3 RcppParallel_5.1.7 matrixStats_1.3.0 R.utils_2.12.3 timechange_0.3.0 spatstat.sparse_3.0-3 [29] scCustomize_2.1.2 colorspace_2.1-0 rappdirs_0.3.3 ggrepel_0.9.5 textshaping_0.4.0 xfun_0.45 jsonlite_1.8.8 [36] progressr_0.14.0 spatstat.data_3.0-4 stringfish_0.16.0 survival_3.2-13 zoo_1.8-12 glue_1.7.0 polyclip_1.10-6 [43] gtable_0.3.5 GiottoVisuals_0.2.3 leiden_0.4.3.1 future.apply_1.11.2 shape_1.4.6.1 abind_1.4-5 scales_1.3.0 [50] colorRamp2_0.1.0 GiottoUtils_0.1.8 spatstat.random_3.2-3 miniUI_0.1.1.1 Rcpp_1.0.12 viridisLite_0.4.2 xtable_1.8-4 [57] reticulate_1.37.0 dotCall64_1.1-1 htmlwidgets_1.6.4 httr_1.4.7 RColorBrewer_1.1-3 ica_1.0-3 farver_2.1.2 [64] R.methodsS3_1.8.2 pkgconfig_2.0.3 uwot_0.2.2 deldir_2.0-4 utf8_1.2.4 janitor_2.2.0 labeling_0.4.3 [71] tidyselect_1.2.1 rlang_1.1.4 reshape2_1.4.4 later_1.3.2 munsell_0.5.1 tools_4.1.1 cli_3.6.2 [78] ggprism_1.0.5 dbscan_1.1-12 generics_0.1.3 ggridges_0.5.6 stringr_1.5.1 fastmap_1.2.0 ragg_1.3.2 [85] goftest_1.2-3 rematch2_2.1.2 knitr_1.47 fitdistrplus_1.1-11 purrr_1.0.2 RANN_2.6.1 pbapply_1.7-2 [92] future_1.33.2 nlme_3.1-152 mime_0.12 R.oo_1.26.0 ggrastr_1.0.2 compiler_4.1.1 rstudioapi_0.16.0 [99] beeswarm_0.4.0 plotly_4.10.4 png_0.1-8 spatstat.utils_3.0-5 tibble_3.2.1 stringi_1.8.4 RSpectra_0.16-1 [106] forcats_1.0.0 lattice_0.20-44 Matrix_1.6-5 vctrs_0.6.5 pillar_1.9.0 lifecycle_1.0.4 spatstat.geom_3.2-9 [113] lmtest_0.9-40 GlobalOptions_0.1.2 RcppAnnoy_0.0.22 data.table_1.15.4 cowplot_1.1.3 irlba_2.3.5.1 httpuv_1.6.15 [120] R6_2.5.1 qs_0.26.3 promises_1.3.0 renv_0.13.2 KernSmooth_2.23-20 gridExtra_2.3 vipor_0.4.7 [127] parallelly_1.37.1 codetools_0.2-18 fastDummies_1.7.3 MASS_7.3-54 gtools_3.9.5 withr_3.0.0 presto_1.0.0 [134] sctransform_0.4.1 parallel_4.1.1 terra_1.7-78 grid_4.1.1 tidyr_1.3.1 snakecase_0.11.1 Rtsne_0.17 [141] spatstat.explore_3.2-7 shiny_1.8.1.1 lubridate_1.9.3 ggbeeswarm_0.7.2
Hi, thank you for reporting this! This is fixed on the dev branch and will be in the GiottoVisuals 0.2.5 release.
I tried multiple values for
coord_fix_ratio
but it does not change the aspect of the plot.However, using
coord_fix_ratio
insideGiottoVisuals::spatFeatPlot2D_single
does behave as expected, so I suspect it is related tocowplot
.