[R] ggsave() with width only

Ivan Calandra c@|@ndr@ @end|ng |rom rgzm@de
Tue Sep 21 08:46:27 CEST 2021

Dear Adam,

This would work indeed, but then the default aspect ratio (1.618) would 
be used. I could as well calculate the height from the width and aspect 
ratio. Unfortunately, this doesn't help me in my case (but as I said, I 
have found a workaround).

Thank you again.


Dr. Ivan Calandra
Imaging lab
RGZM - MONREPOS Archaeological Research Centre
Schloss Monrepos
56567 Neuwied, Germany
+49 (0) 2631 9772-243

Le 20/09/2021 à 21:29, Adam Wysokiński via R-help a écrit :
> Dear Ivan,
> I think you don't need to provide the aspect ratio, as this should 
> work as well:
> save_plot("/tmp/plot.png", p, base_width = 5, base_height = NULL)

More information about the R-help mailing list