【发布时间】:2017-04-09 16:03:35
【问题描述】:
我正在尝试将轴添加到 R 中的位图图中。但它没有显示这些轴。我正在使用带有 R v3.3.0 的 OS X 10.10
set.seed(0)
#Sample matrix
bitmap<-matrix(rnorm(150000,mean=1:500),nrow = 300, ncol = 500)
image(bitmap,col = RColorBrewer::brewer.pal(9,"Greys"), axes=FALSE,
useRaster = TRUE)
axis(1,at = seq(from=1000,to = 10000,length.out = 19),
labels = seq(from=1000,to = 10000,length.out = 19))
axis(2,at = seq(from=0,to = 100,length.out = 11),
labels = seq(from=0,to = 100,length.out = 11))
如何在 R 中以所需范围显示这些所需轴?
如何在 R 中以像素或某个长度单位指定绘制位图的大小?
如何独立缩放位图的宽度和高度?
还有其他 R 包可以让我以更好的方式处理这些参数吗?
【问题讨论】: