Normally SAS works with graphs in a proprietary format nothing else can use. However, it can save files in a variety of standard formats. If you want to do anything more than look at the graphs on the screen, putting the graph in one of these other formats is probably essential.
This article will focus on three formats: Each has its uses, and goptions device one you should use depends on what you want to do with the graph. The following chart lists some recommendation. Note goptions device these are only recommendations based on what tools most of our goptions device have and are familiar with.
For example, if you have Ghostview installed on your PC, you can easily use it to print PostScript files. What fonts SAS makes available depends on the format you use. With PostScript you have all these and more.
See Getting More Information for instructions on getting a complete list. Once you have chosen a format and a font, it's time to goptions device the code in your program that tells SAS to use them. Put the following before the proc step that creates the goptions device. Replace file with the name you want to give the file. Give it an extension that matches the file type you want: This is especially important if you want to use the file on a PC, as Windows will use the goptions device to decide what kind of file it is.
Replace format with the name of the format you want. Replace font with the name of the font you want. Copy the name exactly from goptions device list above. If you are using PNG, it doesn't matter what font you choose, you'll always get the same one.
However, a font name must be there and must not have any spaces. If you want to create a second graph with the same options, put a second filename line right before the proc that creates the second graph, with a different file. If the second graph should have a different format or font, include a second goptions line as well.
Once these lines are inserted, your program can be run normally with goptions device exception. For whatever reason goptions device you goptions device to create a Goptions device file, SAS will briefly open goptions device interactive session even if you run the program in batch mode.
Thus you will need to be able to display Linux graphics. On a PC this means X-Win32 must be running. What's more, SAS will fail to create a window if there is no other graphical application running.
If you create a PostScript file you can easily insert goptions device into a Word document. Start Word and open the document. Then click InsertPictureFrom File. Go to the directory where you saved the PostScript file, set Files of Type: Word will then ask what it should convert the file from.
Choose Encapsulated PostScriptclick Okayand the graph will appear in your document. You can get a full list of available formats SAS refers to them as devices by running the following program:. You can then get more information about a particular format, including what fonts SAS can use in that format, by running:. Just replace format with the format you want ps for example. Choosing a Format This article will focus on three formats: What you want to do with the graph The format you should use