search for: ggplot_gtabl

Displaying 6 results from an estimated 6 matches for "ggplot_gtabl".

Did you mean: ggplot_gtable
2014 Jun 20
1
zuzufarah Help with ggplot 2 error: Aesthetics must either be length one, or the same length as the dataProblems
...max(WUA_table) + .1*diff(range(WUA_table)))) + expand_limits(x = c(min(WUA_discharge) - .1*diff(range(WUA_discharge)), max(WUA_discharge) + .1*diff(range(WUA_discharge)))) + theme(plot.margin= unit(c(0, 0, 0.5, 0.5), "lines")) # Get the gtables gt1 <- ggplot_gtable(ggplot_build(p1)) the error message from the following code states: Error: Aesthetics must either be length one, or the same length as the dataProblems:WUA_table the error appears after the line: gt1 <- ggplot_gtable(ggplot_build(p1)) I would appreciate some help on the matter, it seems lik...
2012 Aug 07
1
Styling gridExtra's title and left labels
...w I can control the style / size of the gridExtra labels? library(gridExtra) library(ggplot2) dsamp <- diamonds[sample(nrow(diamonds), 1000), ] p1 <- qplot(carat, price, data=dsamp, colour=clarity) p2 <- qplot(carat, price, data=dsamp, colour=clarity, geom="path") tmp <- ggplot_gtable(ggplot_build(p1)) leg <- which(sapply(tmp$grobs, function(x) x$name) == "guide-box") legend <- tmp$grobs[[leg]] grid.arrange(arrangeGrob(p1 + theme(legend.position="none") + ggtitle("Scatter Plot"), p2 + theme(legend.posi...
2012 Mar 02
0
ggplot2 0.9.0
...n the future will be able to use it to get information about the plot computations, such as the range of all the scales, and the exact data that is plotted. * Drawing a plot takes place in three documented steps: `ggplot_build` which creates a list of data frames ready for rendering builds, `ggplot_gtable` which creates a `gtable` of grobs, and `grid.draw` which renders the grobs on screen. Each of these returns a data structure which should be useful for understanding and modifying the rendered plot. This is still a work in progress, so please ask questions if anything is confusing. * The...
2012 Mar 02
0
ggplot2 0.9.0
...n the future will be able to use it to get information about the plot computations, such as the range of all the scales, and the exact data that is plotted. * Drawing a plot takes place in three documented steps: `ggplot_build` which creates a list of data frames ready for rendering builds, `ggplot_gtable` which creates a `gtable` of grobs, and `grid.draw` which renders the grobs on screen. Each of these returns a data structure which should be useful for understanding and modifying the rendered plot. This is still a work in progress, so please ask questions if anything is confusing. * The...
2011 Nov 15
1
grid.arrange, grid.layout - legend, global y axis title
Hello, I created several plot with ggplot2 dev mode. Now I want to combine the plots in a grid e.g. 2x2 with a fixed size of the output. What I am doing at the moment is: grid.newpage() pushViewport(viewport(layout = grid.layout(nrow=2, ncol=2, widths = unit(c(7.5,6.5), "cm"), heights = unit(rep(5, 2), "cm")))) print(plot1, vp = viewport(layout.pos.row = 1,
2013 Jul 18
1
Bland Altman summary stats for all column combinations
...),panel.border=element_blank()) + ggtitle(x1$Method) + theme(plot.title = element_text(lineheight=1,face="bold")) + geom_text(data = subset(melt(cor(x1[sapply(x1,is.numeric)])),Var1==Var2),aes(label=Var1),vjust=3 ) }) #Function to grab legend g_legend<-function(a.gplot){ tmp <- ggplot_gtable(ggplot_build(a.gplot)) leg <- which(sapply(tmp$grobs, function(x) x$name) == "guide-box") legend <- tmp$grobs[[leg]] legend } legend <- g_legend(plots$WIG_Method) grid.arrange(legend,plots$Single_ROI+theme(legend.position='none'), plots$Simple_2_ROI+theme(l...