FOCUS AREAS

Graphics

SAS Graphs for Java

The SAS/GRAPH Applets for Java are interactive graphs that are portable on a network and can be run in a Web browser on any platform.

Graph Types:

Additional Features:

Bar Charts (Vertical and Horizontal)

Bar charts represent a requested statistic based on the values of one or more variables. They are useful for displaying exact magnitudes and emphasizing differences among the charted values.

Vertical Bar Chart
Vertical Bar Chart
Horizontal Bar Chart
Horizontal Bar Chart
Bar charts for Java allow users to do the following:
  • Change the variables that are used in the chart and the roles they play in the chart.
  • Display the graph in 2-D or 3-D view.
  • Explore the graph by
    • enabling a pop-up box that displays data values as the mouse moves over the bars
    • displaying only a subset of the available bars
    • panning, rotating, or zooming bar charts that use a depth variable, which is displayed on the Z axis.
  • Set drill-down options.
  • Change the shape or orientation of the bars.
  • Change all text colors, the background colors, and the outline color around bars.
  • Change the visibility or color of the surface behind a 2-D chart, or the surfaces behind, below, and beside a 3-D chart.
  • Hide or change the features of each axis and/or the legend.
  • Change the display of images in graphs that use images (for example, a background image).

Pie Charts

Pie charts use the size of pie slices to graphically represent the value of a statistic for a data range. Pie charts are useful for examining how the values of a variable contribute to the whole and for comparing the values of several variables.

A pie chart with detailed slices produces an inner pie overlay whose slices show the major components that form the outer pie's slices.

Pie Chart
Pie Chart

Pie Chart with Detailed Slices
Pie Chart with Detailed Slices

Pie charts for Java allow users to do the following:
  • Change the variables that are used in the chart and the roles they play in the chart.
  • Display graph in 2-D or 3-D view.
  • Explore the graph by
    • enabling a pop-up box that displays data values as the mouse moves over pie slices
    • displaying only a subset of the available slices.
  • Set drill-down options.
  • Change all text colors, the background colors, and the outline color around pie slices.
  • Hide or change the position of the value and slice labels.
  • Change the display of images in graphs that use images (for example, a background image).

Line, Scatter, and Bubble Plots

Simple line plots show the relationship of one variable to another, often as movements or trends in the data over a period of time. Typically, each variable value on the horizontal axis has only one corresponding value on the vertical axis.

Two-dimensional scatter plots show the relationship of one variable to another, often revealing concentrations or trends in the data. Typically, each variable value on the horizontal axis can have any number of corresponding values on the vertical axis.

Bubble plots show the relative magnitude of one variable in relation to two other variables. The values of two variables determine the position of the bubble on the plot, and the value of a third variable determines the size of the bubbles.

Bubble Plot
Line Plot
Scatter Plot
Scatter Plot
Line, Scatter, and Bubble Plots for Java allow users to do the following:
  • Change the variables that are used in the chart and the roles they play in the chart.
  • Display graph in 2-D or 3-D view.
  • Explore the graph by
    • enabling a pop-up box that displays data values as the mouse moves over the plot points
    • displaying only a subset of the available data points
    • panning, rotating, or zooming 3-D scatter plots.
  • Set drill-down options.
  • Change the shape of the plot points, and/or connect points with a straight line, stepped lines, or needles (vertical lines from the data point to the 0 value of the vertical axis).
  • Change all text colors, the background colors, and the colors of confidence limit lines.
  • Change the visibility or color of the surfaces behind, below, and beside a 3-D plot.
  • Hide or change the features of each axis and/or the legend.
  • Change the display of images in graphs that use images (for example, a background image).

Contour and Surface Plots

Contour plots are two-dimensional plots that show three-dimensional relationships. They use contour lines or patterns to represent levels of magnitude for a contour variable that is plotted on the horizontal and vertical axes.

Surface plots are three-dimensional plots that display the relationship of three variables as a continuous surface. Surface plots examine the three-dimensional shape of data.

Contour Plot
Contour Plot
Surface Plot
Surface Plot
Contour and Surface Plots for Java allow users to do the following:
  • Explore the data by
    • enabling a pop-up box that displays data values as the mouse moves over the plot
    • displaying only a subset of the plot area
    • panning, probing, rotating, or zooming plots.
  • Change the use of color in the plot, or in its axes, legend, or background.
  • Hide or change the features of each axis and/or the legend.
  • Select a style for the plot, choosing between area, block, line, and surface styles.
  • Select the rendering format of the plot, choosing between a faster rendering and a more detailed plot. Also, optimize the rendering speed.
  • Select a viewing perspective for the plot, choosing between a view that makes comparisons easy and a view that enhances the three-dimensional appearance.
  • Depending on the plot style, do the following:
    • Determine whether missing values are used in the plot display.
    • Determine whether outlines are drawn around area contours.
    • Add or delete contour lines in the plot display.

Block, Choropleth, and Prism Maps

Block maps are three-dimensional maps that represent data values as blocks of varying height rising from the middle of the map areas.

Choropleth maps are two-dimensional maps that represent data values by filling map areas with color.

Prism maps are three-dimensional maps in which levels of magnitude of the specified response variables are represented by raised polygons of varying height and color.

Choropleth Map
Choropleth Map
Maps for Java allow users to do the following:
  • Explore the map by
    • enabling a pop-up box that displays data values as the mouse moves over the map areas
    • panning, rotating, or zooming the map.
  • Change the map type so that values for the response data are represented as blocks that are set on the map areas, or as patterns or colors in the map areas, or as raised polygons in the map areas.
  • Change the use of color in the legend, background, and within the map areas.
  • Hide the legend or change its features.
  • Display or hide the background image on maps that are created with background images.

Other Graphs

Critical Success Factor (CSF)

Critical Success Factor
Critical Success Factor
The Critical Success Factor (CSF) graph provides an indication of a particular state. This business tool enables Java applications to visually analyze the success or failure of some data value within given ranges of values.

The CSF graph is frequently used to indicate acceptable, marginal and unacceptable states, usually depicted with the regions of the graph colored green, yellow, and red. Commonly found in Balanced Scorecard applications, the Critical Success Factor graph helps to show the health of a division, department, or product against some predetermined goal.

MetaView Applet

The MetaViewApplet displays SAS metagraphics data as interactive graphics in your Web browser.

Metaview Graph
Metaview Graph
The Metaview applet allows users to do the following:
  • Page through multiple graphs
  • Display slide shows of multiple graphs
  • View data tips associated with a graph
  • Pan and resize (zoom) a graph
  • Access pop-up menus
  • Access other graphs or web pages through hotspot links.

The controls available for viewing graphs can vary from one MetaViewApplet to the next. The MetaViewApplet will automatically present all relevant controls to manipulate the graph(s) unless the control has been disabled through an applet parameter in the html document. The MetaViewApplet automatically makes available certain controls based on how many sets of graphs are available for viewing and the number of graphs in each set.

The Metaview Applet can display any graph that can be generated using SAS/GRAPH.

Constellation Charts

The Constellation chart applet displays node-link data, using the links to represent relationships among the nodes. A relationship might be based on sequence, affinity, or hierarchy. The applet uses color, node shape, node size, and link thickness to show the strength of the relations. The chart supports four layouts: Arcs, Association, Hierarchical and user specified.


Constellation Chart
Constellation Chart
For example, the adjacent figure shows a constellation chart that takes diagnosis data from a medical file and displays it in the Association layout. The link between fatigue and depression seems the strongest in this data using the darkest color. Tool tips can store the detail information about each link and node.

TreeView Applet

The TreeView applet displays a large number of hierarchical data values, focusing on some of those values while retaining the context of the data hierarchy. The applet places a root node at the center of the view and aligns successive levels of child nodes around the root in circles of increasing radius.


TreeView Applet
TreeView Applet
The TreeView applet allows users to do the following:
  • Click any node so that the applet moves that node to a focal position
  • Drag any node to a desired position
  • Set any parent node as the root node of its descendant tree
  • Search the tree structure for a specific node
  • Select, display, or hide any parent node's subtree
  • Reset the tree view to the applet's default view

Annotations

SAS/GRAPH software enables you to use annotations to overlay text and shapes anywhere on a graph. Beginning with Version 9, the graphs for Java support most of the capabilities of SAS/GRAPH's annotation facility.


Annotated Bar Chart
Annotated Bar Chart

This chart shows two response variables in a bar-line overlay chart that contains scatter point values with associated labels. The plot line, values, and labels are drawn as annotations.
Annotated Map
Annotated Map
In this graph, a map is annotated with city names as labels. Lines of different sizes and colors associate the cities with a Pie chart.

Graph Styles

Among the client graphs for Java, bar charts, pie charts, and line plots support style definitions that determine visual characteristics of the graph, such as its use of colors, fonts, background, transparency, drop shadows, and more. The styles have names, and the style definitions are applied to a graph by assigning a style name to it. A style can be applied by the person who creates the graph, and the assigned style can be changed by the person who views the graph.

The same style definition can be applied to both grapical and non-graphical output from a SAS program, thus coordinating the visual characteristics of output tables and graphs.

The following figure shows the same graph with different styles assigned to it. The style names are above the graphs. (The figure shows just a sampling of the available styles.)

Statistical
Statistical style
Science
Science style
Gears
Gears style
Curve
Curve style
Education
Education style
Magnify
Magnify style

In the following figure, the left and right halves of the figure show the same table and graph from SAS output. The output on the left has the Gears style applied to it, and the output on the right has the Magnify style applied to it.

Style=Gears Style=Magnify
Same style applied to table and graph

Saving a Graph to an Image File

The Applets for Java can save graphs directly to a PNG image without saving a version for rendering in the applet. This generates a high quality image that is able to take advantage of the graph styles that are available for the Java graphs. This feature is available to the Graphapplet, Mapapplet, and Contourapplet when the graphs are produced through the Output Delivery System (ODS) using DEVICE=JAVAIMG. The feature is not available when the graphs are generated with a macro.