Trevor L Davis
unread,Sep 21, 2012, 4:07:03 PM9/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggp...@googlegroups.com
Any help would be very appreciated, I keep getting errors. If I comment out the two lines setting axis.text.x and axis.text.y to
element_blank() I get no error (but do get the undesired axis text).
Thanks,
Trevor
> theme_fullframe <- function (base_size = 12){
+ theme(
+ axis.line = element_blank(),
+ axis.text.x = element_blank(),
+ axis.text.y = element_blank(),
+ axis.ticks = element_blank(),
+ axis.title.x = element_blank(),
+ axis.title.y = element_blank(),
+ axis.ticks.length = grid::unit(0, "lines"),
+ axis.ticks.margin = grid::unit(0, "lines"),
+ legend.position = "none",
+ panel.background = element_blank(),
+ panel.border = element_blank(),
+ panel.grid.major = element_blank(),
+ panel.grid.minor = element_blank(),
+ panel.margin = grid::unit(0, "lines"),
+ plot.background = element_blank(),
+ plot.margin = grid::unit(0*c(-1.5, -1.5, -1.5, -1.5), "lines")
+ )
+ }
> qplot(mpg, wt, data=mtcars) + theme_fullframe()
Error in grid.Call.graphics(L_setviewport, pvp, TRUE) :
Non-finite location and/or size for viewport
Enter a frame number, or 0 to exit
1: print(list(data = list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 19.2, 17.8, 16.4, 17.
2: print.ggplot(list(data = list(mpg = c(21, 21, 22.8, 21.4, 18.7, 18.1, 14.3, 24.4, 22.8, 19.2, 17.8, 16
3: grid.draw(gtable)
4: grid.draw.gtable(gtable)
5: grid.draw(gt)
6: grid.draw.gTree(gt)
7: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
8: drawGTree(x)
9: grid.draw(x$children[[i]], recording = FALSE)
10: grid.draw.gTableChild(x$children[[i]], recording = FALSE)
11: NextMethod()
12: grid.draw.absoluteGrob(x$children[[i]], recording = FALSE)
13: grid:::drawGTree(x)
14: grid.draw(x$children[[i]], recording = FALSE)
15: grid.draw.gtable(x$children[[i]], recording = FALSE)
16: grid.draw(gt)
17: grid.draw.gTree(gt)
18: recordGraphics(drawGTree(x), list(x = x), getNamespace("grid"))
19: drawGTree(x)
20: grid.draw(x$children[[i]], recording = FALSE)
21: grid.draw.gTableChild(x$children[[i]], recording = FALSE)
22: pushViewport(x$wrapvp, recording = FALSE)
23: lapply(vps, push.vp, recording)
24: FUN(X[[1]], ...)
25: push.vp.viewport(X[[1]], ...)
26: grid.Call.graphics(L_setviewport, pvp, TRUE)
Selection: 0
>