Stata can export graphs into various formats, including eps
, pdf
, wmf
and emf
.
To be HTML5
-compliant, I would make svg
graphs out of any of this, but results with online conversion tools or Photoshop do not display well.
How can I produce svg
output from within Stata?
A little R or Python script is alright, but the main workflow is tied to Stata.
Note that I am using a Mac, but colleagues also use Windows.
2
Answers
For a cross-platform solution I have had good luck with exporting to
eps
format first and then using Inkscape to convert tosvg
. You can do this on the command-line:The
svg
files are sometimes, but not always, smaller than theireps
counter-parts. If you find some files that Inkscape does not convert well, you can see more options for this part here.Recent versions of Stata (14+) support exporting graphs in scalable vector graphics format natively: