r - 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 并且不知道我忘记安装什么。有人帮忙!
我的 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')"
解决方案
推荐阅读
- java - 重复定义字符串常量会占用更多内存吗?
- reactjs - Material-UI v1:如何为 material-ui v1 中的所有组件设置一个字体大小?
- android - 如何从 Android 向 Azure IoT Hub 发送 SMS
- ansible - 动态构建变量
- javascript - Jquery TokenInput 初始字符串搜索
- javascript - 每当使用jQuery选择选择选项时如何显示模式框?
- android - OREO 以下 Android 版本的工作管理器
- kmdf - UDE 无效的设备描述符
- django - Django:访问 ForeignKey 字段并基于它们创建新关系
- python-3.6 - Python ArcPy - 具有最高字段值的打印图层