
212 Producing High-Quality Figures Using SAS/Graph
®
and ODS Graphics
12.3.2.1.3 Reproduce the Waterfall Plot Using SGPLOT
A NEEDLE plot statement in SGPLOT can be used to easily produce the bars
in a waterfall plot. A needle becomes a bar when the thickness of the line is
increased (thickness = 6 is used in the example).
Needle plots use vertical line segments to connect each data point to a
baseline (SAS Institute, 2012). It has the syntax of NEEDLE X = variable Y =
numeric-variable </option(s)>;. In the following example, PATTERN = SOLID
or DOT is used to specify the line pattern to distinguish the two drugs. A line
pattern can be specied usi ...