By now you have heard all about the SAS(R) STUDIO software that provides access to the power of SAS analytics in a Web browser. The SAS(R) University Edition is also available free for higher education teaching, learning and research.
This software includes ODS Graphics software for creating graphs. You can use the familiar program window to write your own SAS data step and procedures. An example of running your own SGPLOT program is shown in Robert's recent article on How to create a Histogram using the SAS University Edition.
Making graphs gets even easier in SAS Studio by using the graph tasks that are included with the software. When you first launch the software, you will see the user interface shown on the right. Click on the "Tasks" button on the left, and you will see a list of tasks by category.
Here I have highlighted the Tasks folder and the Graph subfolder under it.
Multiple graph tasks are available including Bar Chart, Bar-Line Chart, Box Plot, Histogram, Line Chart, Pie Chart, Scatter Plot, Series Plot and more.
Each of these tasks presents you with a form to set the data and various options as shown on the right. Here, I have launched the "Histogram" task as shown highlighted in blue. This starts the Histogram task.
Each task presents you with an easy to use visual interface to set the parameters and options necessary to make the graph. These are all collected under two tabs - The Data tab and the Options Tab. In the image on the right, the Data tab for the Histogram task is highlighted in yellow.
Each graph task allows you to provide the name of the data set and the required variables to create the graph. In case of Histogram, you need to provide only one numeric variable for the Analysis Role. In the example above, we have selected the SASHELP.CARS data set and the MPG_CITY column for graphing.
Once the required parameters are provided, you can submit the task by pressing the run button or 'F3'. The task will render the histogram using the default settings for styles and present the graph to you in the Results window as shown on the right.
Each task also supports optional settings which are included under the "Options" tab. These options can be used to customize your graph, including setting of titles, footnotes and graph size. In this case, I have set the graph size to 4" x 3" to fit the small region.
Each graph task generates the required SGPLOT code needed to render the graph. This code is available in the Code window under the "Code / Results" tab. This code is built and updated as you apply the settings in the Data and Options panels. So, this is a good way to get started with learning the SGPLOT procedure.
The tasks cover many of the features available in the SGPLOT procedure, but not all. So, you can cut and paste the code into the program window and customize it to your own needs.
You can learn more about creating graphs using SG procedures right here in this blog. Learn all about the procedures themselves in the book on Statistical Graphics Procedures by Example.