gtable Questions

2

Solved

In plots with multiple facet variables, ggplot2 repeats the facet label for the "outer" variable, rather than having a single spanning facet strip across all the levels of the "inner" variable. I h...
Meingoldas asked 22/11, 2016 at 1:49

2

Solved

I have been trying to extend my scenario from here to make use of facets (specifically facet_grid()). I have seen this example, however I can't seem to get it to work for my geom_bar() and geom_po...
Nunnery asked 13/11, 2014 at 20:22

1

Solved

I am using facet_wrap and was also able to plot the secondary y-axis. However the labels are not getting plotted near the axis, rather they are plotted very far. I realise it all will get resolved ...
Prather asked 23/6, 2016 at 6:39

2

Solved

I can't get the answer to this question to work. What both me and that user want is to add axis ticks and labels to all columns when using facet_grid(). Display y-axis for each subplot when face...
Mila asked 3/6, 2016 at 16:40

2

Solved

I am creating a graphic using facet_grid to facet a categorical variable on the y-axis. I decided not to use facet_wrap because I need space = 'free' and labeller = label_parsed. My labels are long...
Club asked 12/3, 2015 at 11:35

1

Solved

For a publication I need to add a second y-axis to an existing plot. I've come across a means of how to do this (https://rpubs.com/kohske/dual_axis_in_ggplot2). However, I don't really understand m...
Hut asked 20/4, 2016 at 20:48

4

Since I have updated to ggplot2 2.0.0, I cannot arrange charts propperly using gridExtra. The issue is that the faceted charts will get compressed while other will expand. The widths are basically ...
Whereunto asked 14/1, 2016 at 18:50

1

I have been trying to make a 2 to 3-line figure caption below the combined plots using the following script: library(grid) library(gridExtra) library(ggplot2) g1 <- ggplotGrob(pl) #pl is my pl...
Claresta asked 15/3, 2016 at 1:21

2

First of all I would like to thank Sir Baptiste for helping me improve my R script by adding a caption at the bottom left the of the combined plots using gtable/textGrob as shown below: library(gr...
Idiocy asked 11/3, 2016 at 9:21

3

Solved

I am attempting to use grobs and gtable to arrange 4 (ggplot2) plots into a 2x2 grid. I don't know how to set widths, and also a non- 1xn, or nx1 arrangement. Using this code: data(iris) a <- ...
Oldwife asked 28/1, 2016 at 17:31

5

Solved

I'm working with the really awesome library ggplot2. I figured out how to set the aspect ratio of a plot by using coord_fixed. Now, I'd like to save the plot to a PDF with a specified width (e.g 10...
Greasy asked 7/5, 2013 at 15:24

2

Solved

I have been attempting this for quite sometime today and still haven't been able to align two different chart types together by their X axis which are the same. I simply need a double line chart on...
Flagrant asked 22/7, 2015 at 20:23

1

At How can I put a transformed scale on the right side of a ggplot2? it was shown how to add two y-axis in the same plot by manipulation and merging ggplot2 objects with gtable. From the example th...
Thirst asked 7/5, 2015 at 14:1

1

Solved

I have arranged two plots: a line chart on top and a heatmap below. I want the heatmap legend to have the same height as the plot area of the heatmap, i.e. the same length as the y-axis. I know th...
Cakewalk asked 20/4, 2015 at 13:43

1

Solved

I am learning to manipulate ggplot objects with gtable. [Here is a related question I asked: dismantling a ggplot with grid and gtable ] The present issue is: how to take various axis elements f...
Receptionist asked 3/1, 2015 at 12:4

1

Solved

I'm struggling to build a dual-axis plot based on ggplot objects. At baptiste's suggestion, I have broken down the problem into smaller parts. The present issue is: how to remove all of the data ...
Spectacled asked 3/1, 2015 at 1:12

1

Solved

I am trying to compose a dual y-axis chart using ggplot. Firstly let me say that I am not looking for a discussion on the merits of whether or not it is good practice to do so. I find them to be pa...
Whereinto asked 4/11, 2014 at 4:24

1

Solved

I am trying to create an arrangement of three scatterplots with shared axes and marginal histograms. This seems like it should be simple, but it's giving me fits. I have tried approaches with gridE...
Anabolite asked 17/9, 2014 at 14:42

2

Solved

Is there an elegant way to align the tableGrob rows with the axis breaks? I would like to juxtapose a tableGrob and ggplot chart in R (I need to reproduce some SAS output used in previous versions...
Alberthaalberti asked 27/1, 2014 at 21:56

5

Solved

It's relatively simple using grid.arrange in the gridExtra package to arrange multiple plots in a matrix, but how can you arrange plots (the ones I'm working on are from ggplot2) when some plots ar...
Highsounding asked 25/8, 2013 at 9:18

1

Solved

QUESTION How do you combine separate plots (ggplot2), with different y-axis and different plot heights, yet retain alignment? DETAIL When combining plots with grid.arrange (method1), with diffe...
Acetous asked 20/6, 2014 at 15:47

1

I have two ggplot geom_tile plots that I put together using grid.arrange() from the gridExtra library. This is the result library(ggplot2) library(plyr) p3 <- ggplot2(...) p4 <- ggplot2(......
Easter asked 12/6, 2014 at 16:4

2

Solved

Using unit.pmax as the default comparison of widths/heights in gtable is proving harder than I'd hoped; after several hours of head scratching I've narrowed it down to this situation: library(grid...
Cartography asked 1/6, 2014 at 20:41

1

Solved

I want to add a facet title as strip over a facetted plot in ggplot2. My MWE throws an error. library(ggplot2) library(gtable) p <- ggplot(mtcars, aes(mpg, wt)) + geom_point() p <- p + facet...
Hartley asked 2/4, 2014 at 16:53

1

I am trying to produce png file of ggplot objects with transparent backgrounds. When I was using the ggplot objects directly with panel.background=element_rect(fill = "transparent",colour = NA) I w...
Signboard asked 26/9, 2013 at 17:56

© 2022 - 2024 — McMap. All rights reserved.