|
|
|
||||
|
|
|||||
The Output Delivery System (ODS) in SAS version 7 and higher provides a great deal of control over the output from SAS procedures including graphics. For example, ODS provides a simple way of creating interactive graphs as Microsoft ActiveX objects. An ActiveX object of a plot on a webpage allows a user to change the appearance of the plot interactively on the webpage. It is worth noticing that an ActiveX object only works on Internet Explorer and the ActiveX controls have to be enabled to make it work.
This page assumes that you use Internet Explorer version 6 and higher. With Internet Explorer version 6 and above, you can easily copy and paste any of the plot that you obtain by modifying the original one to other application programs, such as Word.
This FAQ page will show how to create a scatter plot as an ActiveX object embedded in a webpage and how to make use some of the features that an ActiveX object offers.
It is very easy to create an ActiveX object from proc gplot. Here is a sample code for creating an HTML page for the object. Our webpage will be called scatter.html and is located in the d:\temp folder.
options device = activex; ods html body = 'd:\temp\scatter.html';proc gplot data = hsb2; plot write*math = female ; run; quit; goptions reset = all; ods html close;
Here is the link to the page that we just created. Now let's see what we can do with the plot. Remember at anytime that you want to get the original plot back, you can simply refresh the page.

Right-click on the plot area, follow Options->Data, you will see the window on the left below, select None for the Subgroup and click on Apply, you will see that the plot is changed to the plot shown below.

We may want to change the title of the previous plot to something more
meaningful. Right-click on the plot area and follow Options->Lengend.


We can change the shape and the size of a plotting symbol


You can also change the type of your plot. For example, we may want compare the
mean writing scores between female and male group. Right-click on the plot area,
then follow Chart Type -> Vertical Bars. Then from Options -> Data
shown below, change Category variable to female and Subgroup to
None. Then click on Apply. The plot changed is shown below.

You can add different types of lines to the plot. For example, you can add
regression line to the plot. Right-click on the plot area, and choose Plot
Options.

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services