Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
2 votes
2 answers
178 views

Specify which legend to keep in wrap_plots

I'm looking to combine multiple graphs generated from different functions into a single display. Specifically, I want to only keep the legend of the first graph in the wrap. Here is a minimal version ...
NoNameBoyy's user avatar
0 votes
1 answer
100 views

Why does my legend not move to empty area with patchwork using guide_area()

I have a plot 1 which covers the whole first row and a plot 2 which is a bit smaller below. They have a common guide and I arranged them using patchwork. Now I want to move the guide to the right of ...
Kathrin Loosli's user avatar
3 votes
2 answers
277 views

Increase spacing between legend groups with patchwork settings

UPDATE: The suggested code here p1 + p2 + p3 + plot_layout(ncol = 1) + plot_annotation(tag_levels = 'a') & theme(legend.justification = "left") returned this I need to have the ...
hnguyen's user avatar
  • 804
0 votes
1 answer
257 views

Patchwork + legend position adjustments fail

I am using patchwork to plot 3 maps while two have a common legend Here is the code to produce the maps and plot them: #MAP1: SIF/SM map1=ggplot(data = sif_min_sm2) + geom_tile(aes(x = lon, y = lat,...
herakles_1950's user avatar
2 votes
2 answers
797 views

Legend overlaps the plot in patchwork when using guide_area

guides = "collect" does its job but it locates the legend in a way that it overlaps the plot. I would like it to be placed right in the middle of the empty bottom right corner, but it ...
tipofey's user avatar
  • 47
5 votes
1 answer
3k views

Patchwork won't assign common legend for combined plots

I have combined three plots using patchwork I have followed this SO thread, where a similar issue was solved. However, applying that specific approach on my script does not solve the problem. I want ...
cmirian's user avatar
  • 2,213
10 votes
1 answer
1k views

How to minimize the white space created by the guide_area() function of the patchwork package in plots made with ggplot2?

I made 3 plots with the ggplot2 package. To arrange the plots in a single figure I used the patchwork package. In the arrangement, I put 2 plots at the top, the common legend below these plots and ...
Daniel Valencia C.'s user avatar
1 vote
1 answer
894 views

Legend label combined plots (ggplot and patchwork)

I am new to R and trying to find a simple way to change the labels of the legend for combined boxplots created with ggplot and patchwork. I am comparing the proportions of 5 different types of cells ...
Elena's user avatar
  • 11
1 vote
1 answer
89 views

How to show the tags of an array of ggplots made with the patchwork package?

I have 5 plots that I want to organize in 2 columns: the first with 2 plots and the second with 3 plots. I used the patchwork package and the arrangement was the way I want it, but the tags don't ...
Daniel Valencia C.'s user avatar
0 votes
1 answer
399 views

how to change legend, country labels and size of my multiple area plots with ggplot2?

I have trying to change my legends and the names of the countries that appear multiple times in one of the areas plots. i. As you can see the legend appears several times. I want this legend to be ...
GaB's user avatar
  • 1,114
0 votes
1 answer
1k views

Legend title position using patchwork?

I've laid out 2 graphs using patchwork, and have a legend which describes them both at the bottom. The legend has a horizontal orientation, and I'm trying to move the title to the top, rather than its ...
bee's user avatar
  • 63