I tried several ways of saving my plots from R, but non of them work. Either they are blurry or the colors of the barplot change and the bars become somewhat transparent with an uneven color. The plots were created with ggplot2.
This is what I've tried so far:
ggsave(p, filename = "plot1.jpeg", width = 8, height = 6, dpi = 300, type = "cairo-png")
png("bp.png")
print(p)
dev.off()
And the third option was to just use the export option in the plot window.
It doesn't really matter what format I save them in (pdf, jpeg, png), they're all either blurry or the colors are changed.
Right now I'm just taking screenshots of the plots which is obviously not the proper way to do it.
Down below you can see how the plots change after saving them: