www.sas.com > Service and Support > Technical Support
 
Technical Support SAS - The power to know(tm)
  TS Home | Intro to Services | News and Info | Contact TS | Site Map | FAQ | Feedback

Sample graphs and code using PROC GCHART


Click on the graph or title below to view the source code.

This example has 2 separate programs, both of which use ANNOTATE to overlay a plot line on a vbarOverlay a Plot Line on a Vertical Bar Chart

Producing and Labeling a Population TreeProduce & Label a Population Tree

Maintain Patterns Across By GroupsMaintain Patterns Across By Values

Formatting Percentage Values with No Decimal PlacesFormat Percentage Values

This program uses the G100 VBAR/HBAR option which causes the individual percentages to reflect the contribution of the midpoint to the group and total 100 percent for each groupReflect Contribution of Midpoint to Group

This program uses the ANNOTATE facilty to overlay bars at  1, 2 or 3 STD (Standard deviation/s) or STDERR (Standard Error/s) of the MEAN on an HBAR chartAdd Bars at +/- 1, 2 or 3 STD or STDERR of the MEAN

The Annotate facility is used to draw the bars of the vertical bar chart. The GCHART procedure is used to produce the midpoint and response axesControl Width of Bars Based on a Variable

The Annotate facility is used to draw the bars of the chartCreate Stacked Bar with On/Off States of a Constant

Produce a histogram with a normal parametric distribution curve with an optional additional user specified normal curveCreate a Histogram with Normal Density Curve

The Annotate facility is used to draw reference lines on a vertical bar chart created with PROC GCHARTAdd & Label Refernce Lines

Format the Sumvar Variable Using PROC FormatFormat the Sumvar Variable

If you request the statistic to print above each bar, SAS may produce a message in the log stating that the values are wider than the bars.  If this happens, you can use the ANNOTATE Facility to circumvent the problemAnnotate Values Above Each Midpoint Bar

Beginning with Release 7, the INSIDE/OUTSIDE options can be specified on the VBAR/VBAR3D statement in order to automatically display the percentage value within each subgroupAnnotate Values For Each Subgroup Bar

This example creates a bar chart and a plot and uses GREPLAY to replay them on top of one anotherOverlay Vbar w/Plot Line & Right Vertical Axis

By default the order of the stacked bars is alpha order based on the values of the subgroup variable going from bottom to top.  The legend will show the formatted valuesReorder the Stacked Bars

Use the Annotate Facility to draw one std of the mean on a vbar chart.  PROC means is used to get the necessary statistics to be used by the annotate data stepAnnotate +/- One Std of the Mean - example 1

Use the Annotate Facility to draw one std of the mean on a vbar chart.  PROC means is used to get the necessary statistics to be used by the annotate data stepAnnotate +/- One Std of the Mean - example 2

The CLM and ERRORBAR  options are documented in SAS Technical Document TS604, Using the CLM option to create +/- 1 standard error about the mean is detailed in usage note 10904Produce One Standard Error ERRORBAR=

Labeling Midpoint Values that are Greater than 16 Characters-V6 & V7 and higherLabel Midpoint Values > 16 Characters - V6 or - V7 & higher

This sample uses the FRONTREF option to indicate that reference lines should appear in front of the bars. The default location for reference lines is behind the barsPlace a Reference Line in Front - V7 & higher

This sample uses the INSIDE= and OUTSIDE= options on a VBAR3D statement to label statistics inside or outside the barsControl Placement of Statistic - V7 & higher

This sample uses the NOPLANE option on an AXIS statement to remove the associated veritical and/or horizontal axis planeRemove RAXIS Plane - V7 & higher

This sample uses the SHAPE= option to specify the shape to be used for 3D barsControl the Bar Chart Shape - V7 & higher

This sample uses the WOUTLINE= option to control the outline width of the slicesChange the Outline Width - V7 & higher

This sample uses the SPLIT= option on an AXIS statement to specify the split character to be used to automatically place multiple lines of text for axis valuesDisplay Multiple Line Axis Values - V7 & higher

This sample uses the SUMLABEL= option on the HBAR3D statement to replace the default column header for the statistics displayed to the right of the barsControl the HBAR Statistics Label - V7 & higher

Create a Relative Average ChartCreate a Relative Average Chart






Copyright (c) 2002 SAS Institute Inc. All Rights Reserved.
Terms of Use & Legal Information | Privacy Statement