0

I am attempting to display 4 separate plots in the same figure. I am using the following code:

library(lattice)
library(gridExtra)
p1 = dotplot(mpg ~ cyl, data = mtcars)
grid.arrange(p1,p1,p1,p1)

but this gives me a plot that is sort of smushed. How can I make this more visually pleasing? I want to make the graphs bigger so they can actually be read. I tried adding the heights argument to grid.arrange but this did not help

enter image description here

z_11122
  • 153
  • 8
  • 1
    You can either reduce the font size or make your output graphics device larger. It's not clear at all how you are looking at this image. Are you saving to a file? Or previewing the RStudio plot viewer? It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input that can be used to test and verify possible solutions. – MrFlick Oct 28 '21 at 17:19
  • Have you looked in `?grid.arrange` for options, etc.? What have you tried? – Dylan_Gomes Oct 28 '21 at 17:22
  • @MrFlick I am using the RStudio plot viewer. How does one make the output graphics device larger or reduce the font size? – z_11122 Oct 28 '21 at 17:29
  • @MrFlick I will edit the question to provide a reproducible example. – z_11122 Oct 28 '21 at 17:37
  • @Dylan_Gomes I adjusted the `heights` and `widths` values, but this does not make the plots any more legible. – z_11122 Nov 01 '21 at 00:27

0 Answers0