
Because of vector graphics, there is no need to save a large version of your graph to display on a projector or to please a publisher. You can change the size, which matters only in terms of the text in the graph, which will appear smaller as the whole of the image gets bigger. There are not many options to deal with if you use graph export from the command line or a do-file. In version 15, you will find SVG in the menu as well: Simply type:Īnd Stata will do the rest for you.

However if you have 14 or 15, you can use it. Graph export acquired the ability to export to SVG in Stata version 14, but it was somewhat experimental and wasn’t documented in the manual or help files until version 15. We’ll expand on this idea below, and show why it is worth looking into, even if the idea of editing files by hand sounds scary. With SVG, you have the option of editing it in one of these, or manually in a text editor. Just as there are software packages to edit raster graphics, like Photoshop or GIMP, there are also editors for vector graphics, like Illustrator (a commercial package by Adobe) or Inkscape (an open-source package). That also means that humans can edit an SVG file, perhaps changing some text or the colour of a line. SVG differs from the others in being written in plain text, which means humans can read and understand it, not just computers. SVG, PDF, and PostScript are the most common vector formats. svg, and you will have covered all your options. The SVG can be converted to a raster later, at whatever size or resolution is required, which makes it an ideal standard format to use for saving and sharing your graphs. You might have noticed this about PDFs before: no matter how much you zoom in on the text, it stays sharp-edged and clear. Because these files do not have information by the pixel, if you enlarge them, they do not become blurred or pixelated. The alternative is vector graphics, which instead contain a recipe which the computer can follow to recreate the image, by putting together elements like lines, rectangles, polygons, circles, colour gradients and so on. Generally, with formats like PNG and JPEG, there are compression algorithms that save space, so not every pixels is literally listed in an array (though that is the case for the old bitmap BMP file format). Images can be stored digitally as raster files, which essentially list the colours of all the pixels. We’ll also show you how you can manipulate SVG after you export it to great effect. In this post, we will outline what makes SVG great, and why Stata is better at making SVG than other analysis packages. Scalable Vector Graphics (SVG) is a file format with a lot of advantages for Stata users.
