Question
I'd like to save a ggplot from R for editing in Adobe Illustrator (AI). I can save the plot in EPS or PS format with ggsave, but the plot always brings along some shading around the text. Is there a way to fix this in R or Adobe Illustrator?
For example, my plot looks like this:
But, when I import it into AI, it looks like this (pink shading around text):
Code
# Saving a plot for editing in Adobe Illustrator. library(ggplot2) # for plotting library(cowplot) # for ggsave # Generate an example scatter plot. # From: http://r-statistics.co/Top50-Ggplot2-Visualizations-MasterList-R-Code.html options(scipen=999) # turn-off scientific notation like 1e+48 theme_set(theme_gray()) data("midwest", package = "ggplot2") plot <- ggplot(midwest, aes(x=area, y=poptotal)) + geom_point(aes(col=state, size=popdensity)) + geom_smooth(method="loess", se=F) + xlim(c(0, 0.1)) + ylim(c(0, 500000)) + labs(subtitle="Area Vs Population", y="Population", x="Area", title="Scatterplot", caption = "Source: midwest") plot # Save the plot as .eps with ggsave. file <- "myplot.eps" ggsave("myplot.jpg",plot)