Questions tagged [gridextra]
`gridExtra` is a package providing convenience functions and extensions on top of `grid`, a low-level framework for R graphics. This facilitates the arrangement of multiple ggplot objects on a single plot.
gridextra
564
questions
0
votes
1
answer
36
views
Saving figure created using ggplot and grid.arrange to specific folder using ggsave and here [closed]
I am working from an R project and have files arranged in folders: Data, Script, Output_Files. I have created a figure using grid.arrange and ggplot and want to save it to the Output_Files folder ...
2
votes
1
answer
50
views
Use ggplot2 to loop through multiple plots and add a table
I am trying to produce a large volume of plots with data tables underneath. The plot will contain an individual store's sales by year for two different products. I also need a table underneath ...
0
votes
0
answers
33
views
Assign color to secondary axis title when using marrangeGrob
I am creating double axis plot using marrangeGrob and wondering if I can assign the color to the secondary axis title.
This is my code:
marrangeGrob(p1plot, nrow = 2, ncol = 2, right = yright, left = ...
0
votes
1
answer
59
views
How to put the inequality symbol (<=) in the rows of a table with grid.table in R
I can't get the attached table, (<=) to show up as
The table is variable and has been constructed as follows:
limites1 <- function (m ){
h1 <- NULL
for (i2 in 1: m){
h1 <-c(h1 , ...
0
votes
0
answers
32
views
Combining a table and a plot: kableExtra table not converting properly to grid graphic
I'm trying to combine a table and a plot into one image using R, with the aim to align the table and image vertically.
As I understand tableGrob() should be able to convert a kableExtra object into ...
1
vote
1
answer
36
views
How to make bars in ggplot all have the same ratio of xlab to plot?
I made a custom function to make plots. To the left of the plot, I show the question, and to the right, I show the proportion of positive, neutral, and negative responses. I use map() from the purrr ...
0
votes
1
answer
45
views
How to hack a grid::grob object in R to change existing text or add new?
EDIT
I don't have the underlying counts, just the end values for proportions.
Original Post
I have summary data for set intersections that I wish to visualize with R.
Probability of A: 0.2
...
1
vote
2
answers
108
views
Combine Table and Plot using ggplot and gridExtra [duplicate]
Trying to find a more elegant solution for combining plots with tables using dplyr, ggplot, and gridExtra package. Addtionally, need help controlling digits displayed in table.
I would like to do the ...
1
vote
1
answer
35
views
how to edit ggplot's legend words using a custom object(gtable)?
How can i edit ggplot's legend using a gTree objec?
my data is
d1 <- data.frame(structure(list(g = structure(c(1L, 2L, 3L, 4L, 1L, 2L, 3L, 4L,
1L, 2L, 3L, ...
1
vote
1
answer
76
views
Title and legend adjustment with `grid.arrange`
I have 6 different plots in R that I want to arrange in one plot with grid.arrange. They share the same legend, but whenever I want to put a common legend, the sizes of the plots are adjusted ...
2
votes
2
answers
199
views
List of plots arranged in a particular layout in a multipage PDF not working
Suppose that out of a loop I am getting a particular set of plots that I am saving in a list of plots like in my reproducible example.
plot_list = list()
for (i in 1:5){
dummy1 = ggplot(iris, aes(x =...
1
vote
1
answer
204
views
arrangeGrob() and similar alternatives do not accept a list of grobs . At grid.draw, returns: Error in gList(...) : only 'grobs' allowed in "gList"
I am making a large volume of plots from survey data that requires the entire text of each question to be displayed next to the resulting bar chart. Arranging a grid of grobs seems the best way to do ...
1
vote
1
answer
86
views
How can I plot an image directly above a ggplot aligned with the graph below?
I am trying to insert an image at the top of an already existing ggplot object. Below is an example of my end goal, created using an image processor.
...and here is some code that replicates the ...
0
votes
2
answers
78
views
Try to put multiple ggplot into one image but all plot are same
I am trying to put multiple ggplot chart into one but all the plot are same, please help with below example:
library(tidyverse)
library(gridExtra)
url <- paste("https://raw.githubusercontent....
1
vote
1
answer
50
views
modifying the colors of a grid table
i have this dataframe (the gdp of a certain country and a subregion of said country, and the yearly changes in %). The dataframe is this:
Rows <- c("GDP state", "yearly change %"...