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...
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...
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...
2
Solved
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...
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...
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....
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(...
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)...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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):
#...
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)
)...
1 Next >
© 2022 - 2024 — McMap. All rights reserved.