user13589693
user13589693

Reputation: 369

Prevent ggplot from auto-adjusting facet sizes in R

I have this problem where R will auto-adjust the size of the facets in ggplot. In the 2 attached images, clearly, the one scaled from 0-100 on the y-axis is less stretched out compared to the one scaled at 6.6-7.2. These are plotted using the same ggplot commands from maaply, so I don't know where the difference would come from. Is there any way to prevent R from performing the auto-adjusting to keep the formatting of each ggplot the same? My OCD and I thank you.

enter image description here

enter image description here

Upvotes: 0

Views: 180

Answers (1)

user13589693
user13589693

Reputation: 369

It looks like I have made a copy and paste error where I used some the the wrong variable to set the base_height in save_plot within mapply, so the scaling factor was varying across iterations.

Upvotes: 1

Related Questions