0

When I try to remove the strips of a facet plot, e.g. with

ggplot(mtcars) +
   geom_point(aes(x=drat, y=mpg, color=cyl)) +
   geom_line(aes(x=drat, y=mpg, color=cyl)) +
   facet_grid(vs~am) +
   theme(strip.text.y = element_blank(),
         strip.background.y = element_blank()
   )

I get the error message

Figure margins too large

with ggplot version 3.3.3, when I am running this in PyCharm. When I run it in RStudio, the issue does not arise.

Why is that and what can I do about it?

Make42
  • 12,236
  • 24
  • 79
  • 155
  • 1
    Is this done on `Rstudio` as I couldn't reproduce on R console. Then, you may need to make the plot window a bit larger – akrun Jun 16 '21 at 16:40
  • @akrun: It is done in PyCharm actually. I checked: The issue does not arise in RStudio. I did not even consider that it might be an issue related to PyCharm. I will update the question. – Make42 Jun 16 '21 at 16:41
  • 1
    Can you try to make the plot window larger (if there is an option) – akrun Jun 16 '21 at 16:42
  • 1
    @akrun: There is an option to choose between "IDE" and "R" - whatever that means. I switched from "IDE" to "R" and now the plot is displayed. Thanks for sparring! – Make42 Jun 16 '21 at 16:49

0 Answers0