To test the Chart facility, begin an SPSS session under X-windows, then run the following program to create an active file (you can also use the GET command, if you have a save file from a previous SPSS session):
DATA LIST FREE / VAR1 VAR2.
BEGIN DATA.
234 1
432 1
325 2
543 2
437 2
874 2
375 3
934 3
225 3
END DATA.
Now, ask SPSS to graph the data in a pie chart:
GRAPH PIE=MEAN(VAR1) BY VAR2.
This will create a graph on your terminal screen.
Printing an SPSS graph to paper is done through the File>Print menus. To send a graph directly to the printer, click File>Print, then click the Setup button, make sure the Print to File Only button is not selected, enter the printer name in the Printer field, then click Continue, then (on the original Print window), click OK.
To send the graph to a PostScript file for later printing
(e.g., with the UNIX lpr command), go to the
Chart Carousel, then click File>Print.
In the Print:SPSS window, click the Setup button, then in
the Chart Printer Setup window, choose Postscript (either
Landscape or Portrait), click on Print to File Only, and
fill in the desired file name.
When you click on Continue, the Print:SPSS window will reappear,
with the chosen filename referenced at the top.
Finally, when you click OK, the file will be created.
To print the file to a PostScript printer, you can use the
UNIX lpr
command as in the following example which prints a PostScript
file called grafile.ps to the printer in UCC:
lpr -Pps_ucc101 grafile.psThe use of the Chart facility and the GRAPH command within SPSS are documented in the References listed below.