Skip to content
Back to formatted view

Raw Message

Message-ID: <22aa6abd-6fe0-f968-2283-8dccd96777ac@rgzm.de>
Date: 2021-09-06T14:03:46Z
From: Ivan Calandra
Subject: ggsave() with width only

Dear useRs,

I produce several independent ggplot2 plots and I would like to save 
them to a fixed width (for publications), but the height (and therefore 
aspect ratio) is different from plot to plot.

How can I save my plots with ggsave() supplying only a fixed width but 
without knowing the height nor the aspect ratio? If I specify the width 
only, the plots are truncated in width because the aspect ratio is not 
correct.

Thank you for the tip!
Ivan

-- 

Dr. Ivan Calandra
Imaging lab
RGZM - MONREPOS Archaeological Research Centre
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243
https://www.researchgate.net/profile/Ivan_Calandra