首页 > 解决方案 > R 绘图在生成文本/数字标签时存在问题

问题描述

我的一般 R 绘图功能有问题。从新的 R 重新启动,并且不加载任何包,我运行这个:

png(file ="mtcars.png", width = 1600, height = 1600, units = "px", res = 300)

hist(mtcars$mpg, breaks = 'FD', col = 'blue', xlab = 'MPG', main = 'MPG of mtcars Dataset')

dev.off()

结果就是你在这篇文章中看到的。标签应该在的地方有一些奇怪的方块。我在一个新的 docker 镜像中运行 R 并且不知道我忘记安装什么。有人帮忙! mtcars 直方图

我的 dockerfile 包含:

RUN conda install -y r-base && conda install -c bioconda -y r-devtools
RUN \
/opt/conda/lib/R/bin/R -e "getOption(\"unzip\") ; options(repos = list(CRAN=\"http://cran.rstudio.com/\")) ; Sys.getenv(\"TAR\") ; options(unzip = \"/opt/conda/bin/unzip\") ; \
Sys.setenv(TAR = \"/bin/tar\"); library(devtools) ; install.packages(c('Seurat','XML','ggplot2')) ; \
devtools::install_github(repo = 'satijalab/seurat-wrappers',quiet=T) ; \
if (!requireNamespace(\"BiocManager\", quietly = TRUE)) { \
    install.packages(c(\"BiocManager\"), quiet = T) \
} ; \
BiocManager::install('monocle')  ; devtools::install_github('hms-dbmi/conos')"

标签: rdockerconda

解决方案


推荐阅读