Using the patchwork R package to combine two ggplot2 plots into one figure (CC166)

  Рет қаралды 3,052

Riffomonas Project

Riffomonas Project

Күн бұрын

Пікірлер: 16
@Riffomonas
@Riffomonas 3 жыл бұрын
Give me your critique! What do you think of my final visual? Feel free to tweet at me your version of a figure comparing people's intention to receive the vaccine vs the rate of people who have been vaccinated.
@daniela-ct2vc
@daniela-ct2vc 3 жыл бұрын
Wow! Thank you for the video, it is very helpful, take care.. Best
@Riffomonas
@Riffomonas 3 жыл бұрын
My pleasure Daniela! Thanks for watching ;)
@gfcapablanca
@gfcapablanca 3 жыл бұрын
Thank you! Helped a lot. I never cared about doing the figure tuning (actually I used to do this manually on corel draw), but I guess it's time to give it a shot with patchwork.
@Riffomonas
@Riffomonas 3 жыл бұрын
I love being able to do everything from within R 🤓
@nikoskorfiatis3406
@nikoskorfiatis3406 3 жыл бұрын
Amazing tutorial Pat - maybe also adding the % sign on the x axis tickmarks since they represent percentage points :)
@Riffomonas
@Riffomonas 2 жыл бұрын
I hear you Nikos. I personally prefer putting the % in the axis labels rather than on the tick marks because it makes the visual less cluttered. Thanks for watching!
@konormccracken
@konormccracken 3 жыл бұрын
a cool alternative to ggpubr! thank you!
@Riffomonas
@Riffomonas 3 жыл бұрын
Hi Conor - thanks for watching! Someday I'll have to check out ggpubr. For whatever reason that never seemed to enter our workflow. My group has mainly used cowplot and has been exploring patchwork more recently
@venkatpgi
@venkatpgi 2 жыл бұрын
Thanks Pat for once again a nice demonstration. I have two doubts. First - how to get a common caption for both the plots. I tried using the plot.caption function within the theme function of ggtext. I could get that. But I am unable to adjust the line spacing and separator is not working within plot.caption. Second - when I save the figure using ggsave( ) within a RMD chunk, it seems to save the plot like a snapshot. This saves the plot in a untidy manner. Any better way to save the plot?
@Riffomonas
@Riffomonas 2 жыл бұрын
You might look back over the patchwork documentation to see if there’s any theme options for the overall plot caption. Maybe would Work within element_markdown? For saving are you putting the .tiff or .jpeg on the file name you want to save the image as? You might check the resolution settings in ggsave if it looks too grainy or the wrong size
@felipegomesmadruga8813
@felipegomesmadruga8813 3 жыл бұрын
Is there any reason to save your graphics in .tiff rather than .pdf or .svg? Thanks for the lessons in R!!
@Riffomonas
@Riffomonas 3 жыл бұрын
Nope. The journals I submit to ask for tiffs so I think that created my habit. Thanks for watching!
@christiantrolle9556
@christiantrolle9556 3 жыл бұрын
Do you ever use ggbreak. Insert a break in y axis. Nice Wien you need to visualize extreme outliers . Of course need to be very clear that there i a y axis break. You could achieve the same with patchwork i Think.
@Riffomonas
@Riffomonas 3 жыл бұрын
Hi Christian - I haven’t done much with breaking the y-axis. Except for odd ball outliers it seems that people often feel this is necessary because they’re comparing the wrong groups like when they’re focusing on differences between replicates when the real impact is between treatments
@christiantrolle9556
@christiantrolle9556 3 жыл бұрын
@@Riffomonas thank you. I
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 55 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 57 МЛН
How I animate 3Blue1Brown | A Manim demo with Ben Sparks
53:41
3Blue1Brown
Рет қаралды 1,1 МЛН
Going for simple with ggplot2 and dplyr (CC320)
30:58
Riffomonas Project
Рет қаралды 1 М.
Learn Machine Learning Like a GENIUS and Not Waste Time
15:03
Infinite Codes
Рет қаралды 195 М.
Make Multiplots Like a Pro with {patchwork} | R package reviews
10:26
yuzaR Data Science
Рет қаралды 3,1 М.
I never understood why you can't go faster than light - until now!
16:40
FloatHeadPhysics
Рет қаралды 4,6 МЛН