0 votes
1 view
in R Programming by (6.5k points)

How do I export a graph to an .eps format file? I typically export my graphs to a .pdf file (using the 'pdf' function), and it works quite well. However, now I have to export to .eps files.

1 Answer

0 votes
by (25.3k points)

To save a graph to an eps file, you can use the setEPS() function as follows:

setEPS()

postscript("whatever.eps")

plot(rnorm(100), main="Hey Some Data")

dev.off()

In ggplot2, you can use the ggsave() function as follows:

ggsave(file="name.eps")

The eps file will be saved in your current working directory.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...