r-grid

    4热度

    2回答

    我想用网格包创建透明线。 此作品(仅用于水平和垂直线): require(grid) grid.newpage() grid.rect(x=0.5, y=0.5, width=0, height=0.5, gp=gpar(col=rgb(1, 0, 0, .4))) 然而,这并不: grid.newpage() grid.lines(x=c(0.5, 0.5), y=c(0.25, 0.

    2热度

    1回答

    我使用包中的grid.arrange将两个图形放在一个页面上并将其保存到png文件中。我喜欢改变由grid.arrange产生的最终png文件的背景颜色。可能吗?我无法遇到任何信息。 grid.arrange(p1, p2, main=textGrob("CPU Util", gp=gpar(cex=1.2, fontface="bold", col="#990000")), ncol = 1,

    6热度

    3回答

    我正在安排由ggplot2生成的图。我必须使用print来打印出图表和grid.draw来显示图例。 示例代码: p0 <- ggplot(data = iris, geom = 'blank', aes(y = Petal.Width, x = Petal.Length, color = Species)) + geom_point() + theme(axis.titl

    10热度

    1回答

    我想用文件名注释我的图。随着plot()我用mtext: plot(1:10) mtext("File xy-12-34-56.csv", 4) 我怎么能做到这一点与GGPLOT2和qplot或ggplot?它不应该与传说相冲突。 我发现了annotate和grid这两个命令,但是用这些命令我找不到类似mtext的注释。 作为一种变通方法我可以尝试watermarks,但也许你有一个很好的提

    3热度

    1回答

    我想绘制类似于beanplot或violin绘图的绘图,但不是对称形状,我想在中心线的不同侧绘制两个不同的分布。像这篇文章中的图4一样[pdf] http://www.jstatsoft.org/v28/c01/paper。 我想在R中使用grid图形引擎。任何指针都会有用。我看了lattice包和histogram函数包,但这不是我想要做的。 任何帮助/指针表示赞赏。

    3热度

    1回答

    在R和网格包中,有没有办法提取单元的单元类型? 例如为: x <- unit(1,'inches') 是否有确实的功能: unittype(x) # returns 'inches' (?嗯,我敢肯定有 - 但它是什么) 欢呼。

    8热度

    1回答

    在新机器和ggplot2上安装了R 2.15.2。这个最新版本的R不再支持grid包,但ggplot2使用grid作为arrow()函数,就像这些例子一样。 http://docs.ggplot2.org/current/geom_segment.html 一直没能找到一个解决办法。有什么建议么?

    2热度

    1回答

    我想用网格包绘制色彩坐标。像heat.plot(10)。 我想是这样的: require(grid) legendViewport <- viewport(height=0.3, width=0.8) pushViewport(legendViewport) grid.rect(gp = gpar(col = "gray90")) 比方说,我想分0比1,到10,并填写heat.color

    6热度

    1回答

    是否有可能“强制”R基地grid包的grid.newpage?例如,这工作正常: library(grid) grid.newpage() vp1 <- viewport(x=0,y=0.5,width=0.5, height=0.5, just = c("left", "bottom")) vp2 <- viewport(x=0.5,y=0,width=0.5, height=0.5, j

    16热度

    1回答

    我试图用两个表示形状和颜色的传说(下面例子中的“Type”和“Org”)制作地图,并且有图例插图。我可以放置传说,但我希望他们左对齐,使他们的左边缘排队。我不能做出比相对于其他中心他们任何东西给对方: require(ggplot2) require(ggmap) require(grid) require(mapproj) data <- data.frame(Org=rep(c("A