On a virtual machine on Azure, the following code produces a file with 4 KB that cannot be opened by a viewer:
pdf(pdf_filepath)
ggplot2::ggplot(...)
dev.off()
The code with png("...png")
fails to even produce an image.
How to save a plot on a virtual machine without graphic devices?