Skip to Main Content

How do I save a Stata graph as an EPS file? | Stata FAQ

The graph export command can be used in Stata to save a graph as an
Encapsulated Postscript file for use in applications like LaTeX. Here is a simple example.

use https://stats.idre.ucla.edu/stat/stata/notes/hsb2, clear
(highschool and beyond (200 cases))

graph twoway scatter read math
Image grapheps
graph export mygraph.eps
(file mygraph.eps written in .eps format)

The graph export command supports a number of other graphic file
formats as well, and the formats supported vary depending on whether you are
using a Macintosh, Windows or Unix.  You can learn more by seeing the Stata
help for graph_export.