Sample 24935: Create a 'shadow' behind a needle plot
goptions reset=all cback=white border ftext=zapf;
data a;
input xvar yvar zvar;
datalines;
1 10 2
2 20 2
3 27 2
4 42 2
5 50 2
6 40 2
7 36 2
8 55 2
9 75 2
;
/* This data step creates a dummy Y variable. The offset that is */
/* used will vary dramatically based on the original Y variable */
/* value. The data step also offsets the midpoint variable to */
/* give the graph the shadow effect. The midpoint variable values */
/* will also vary dramatically based on the midpoint axis data range. */
data b;
set a;
yvar = yvar - 1;
xvar = xvar + .2;
zvar = 1;
run;
data combine;
set a b;
run;
proc gplot data=combine;
plot yvar * xvar = zvar / lvref=1 cvref=black autovref haxis=axis1
vaxis=axis2 cframe=cyan nolegend;
axis1 order=(0 to 10 by 1) offset=(0,0) minor=none;
axis2 order=(0 to 100 by 20) offset=(0,0) minor=none;
/* The widths used on the SYMBOL statements will vary dramatically */
/* based on the device used to display and/or print the graph. */
symbol1 i=needle v=none c=black w=40;
symbol2 i=needle v=none c=yellow w=40;
note h=3 c=black j=center move=(31,83)pct f=swissb 'Shadow Plot'
h=3 c=yellow j=center move=(30,84)pct f=swissb 'Shadow Plot';
run;
quit;

This sample creates a 'dummy' Y variable that will be used to draw a plot line that appears to be a vbar raised off of the background which creates a shadow effect.
| Type: | Sample |
| Topic: | SAS Reference ==> Procedures ==> GPLOT Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Symbols/Interpolation
|
| Date Modified: | 2005-08-31 03:03:22 |
| Date Created: | 2004-11-11 11:08:03 |
Operating System and Release Information
| SAS System | SAS/GRAPH | All | n/a | n/a |