gtable Questions

3

Solved

This post describes a method to create a two-line x-axis (year below months) on a time series plot. Unfortunately, the method that I use from this post (option 2) is not compatible with ggsave(). ...
Nieshanieto asked 28/9, 2018 at 11:56

2

Solved

Intro I want to draw lines between a faceted ggplot. The main goal is to connect those measurements with a line which we want to test against. So basically I want to insert some kind of significanc...
Homestead asked 1/8, 2023 at 15:48

2

Solved

Here is some minimal code to generate a graph with two sets of facets. library("ggplot2", quietly = TRUE, warn.conflicts = FALSE) library("RColorBrewer", quietly = TRUE, warn.conflicts = FALSE) va...
Carter asked 29/4, 2016 at 14:40

1

Solved

With ggplot::geom_point we are able to set any character for plotting symbols using scale_shape_manual. I am coming with an example which demonstrates the purpose: use triangles to make a heatmap w...
Noaccount asked 30/1, 2018 at 22:2

3

Solved

I am trying to combine facet strips across two adjacent panels (there is always two adjacent ones with the same first ID variable, but with two different scenarios, let's call them "A" an...
Czechoslovakia asked 30/6, 2020 at 7:27

2

Solved

With the code found at https://gist.github.com/low-decarie/5886616 A dual dendodogram tile plot can be produced: dual_dendogram_tile_plot(as.matrix(USArrests), main="USA Arrests") The problem: ...
Osmosis asked 28/6, 2013 at 17:55

4

Solved

I was trying to replicate this chart from The Economist (the one on the left). The chart plots the number of billionaires in Russia on the left y-axis and the number of billionaires in rest of the...
Isocyanide asked 20/5, 2016 at 12:45

9

Solved

I'm using ggplot and have two graphs that I want to display on top of each other. I used grid.arrange from gridExtra to stack them. The problem is I want the left edges of the graphs to align as we...
Ranzini asked 8/11, 2012 at 17:59

1

Solved

I am trying to increase the fontsize for a second axis title added as a grob (for reasons that will become apparent). Here is some toy data to graph library(Hmisc) library(dplyr) # Plot power vs....
Bloodsucker asked 6/11, 2019 at 4:12

1

I am trying to create a complete set of plots using facet_wrap from the ggplot2 package in R. As a simplified example I used a subset of the dataset mpg included in ggplot2 library(plyr) library(...
Lithia asked 28/8, 2014 at 17:21

2

Solved

My problem is somewhat related to Convert units from npc to native using grid in R . I'm trying to figure out the location of certain plot elements start in a ggplot2 object (axes, main plot, etc)...
Selenaselenate asked 15/10, 2019 at 9:51

3

Solved

I am having a hard time making the title of a legend center-aligned relative to the legend keys when the legend title is long. There is a question from a year ago that works for short titles, but i...
Leatherback asked 28/12, 2017 at 0:46

2

Solved

I need to reproduce plots generated in InDesign in ggplot for reproducibility. In this particular example, I have two plots that are combined into one composite plot (I have used the package {pat...
Piggin asked 30/8, 2019 at 16:8

2

Solved

I'm having difficulty to find solution for aligning ggplot grob and table grob. I tried to follow the instruction here but still didn't give the results I wanted. library(grid) library(gridExtra) l...
Bisector asked 26/10, 2016 at 14:51

3

Some time ago, I inquired about adding a secondary transformed x-axis in ggplot, and Nate Pope provided the excellent solution described at ggplot2: Adding secondary transformed x-axis on top of pl...
Logical asked 7/4, 2016 at 21:10

3

Solved

I have used gridExtra to create 2 plots next to each other and I can save the object using ggsave However, the plots are misaligned in gridExtra so I used this method #Method 2 - gtable requir...
Barbital asked 14/10, 2015 at 19:40

2

Solved

I have the same problem as this user: I'd like to make a facet_grid plot with a discrete x-axis, and I'd like to have the x-axis labels be written under each facet rather than only underneath the b...
Geomorphic asked 15/7, 2013 at 18:17

1

Solved

I created pie charts displaying different scores (0 - 100%) in ggplot with the help of facet_grid(). However the last score is a total score combining the other scores and in order to distinguish i...
Nutbrown asked 6/9, 2018 at 16:21

3

Solved

I have created a plot like the one here with ggplot2 package and facet_wrap function, and I would like to suppress some of the x-axis text to make it more legible. For example, here it would be m...
Congratulate asked 3/9, 2014 at 8:53

2

Solved

I am trying to combine two FACETED ggplot objects with coord_equal() using cowplot::plot_grid() or egg::ggarrange() and vertically align them. The egg::ggarrange() approach works fine for UNFACETE...
Twitty asked 24/2, 2018 at 10:44

2

Solved

I am trying to combine two ggplot objects using cowplot::plot_grid() and vertically align them. This is normally quite simple using align = "v". dat1 <- data.frame(x = rep(1:10, 2), y = 1:20) d...
Saviour asked 22/2, 2018 at 9:48

0

The grid package used for generating graphics in the R language uses so-called "normal parent coordinates" (npc) to position graphical objects ("grobs"). Is it possible to get the npc coordinates o...
Carisacarissa asked 9/2, 2018 at 16:47

1

Solved

This appears to be similar to an issue that @baptiste was trying to work around back in 2014. I am revisiting code I wrote back in June that involved creating three ggplotGrobs and combining them w...
Leeleeann asked 14/11, 2017 at 6:17

1

I wish to add a scale bar and a north arrow outside of the plot area of a facetted map plot. As an example, consider the following facetted map plot, as seen in a blog post by Max Marchi (link): #...
Johnajohnath asked 21/3, 2017 at 21:59

1

Solved

Say I have a dataset like this: dat <- data.frame text = c( "It made me feel very positive to brand X", "It was clear and easy to understand", "I didn't like it al all"), value=runif(3) )...
Photodrama asked 1/1, 2017 at 5:12

© 2022 - 2024 — McMap. All rights reserved.