1 v; t1 L b2 Z9 K+ C8 O( Y) p' Y
本来准备在sgplot的band语句画区域作为背景来实现的,但是由于存在bar图与band不兼容的情况,于是只好转向anno了。见SAS公司详细说明。 i. e' e7 u8 N5 V+ G3 B
There are four basic types of plots that you can create with the SGPLOT procedure:1 i6 u+ k. P/ Y) k* |( X! }1 c- \# p/ M
Basic plots9 _/ R3 z7 q! k# M/ H
scatter, series, step, band, needle, and vector plots 5 S7 }0 w, l' A) F2 s$ @4 \Fit and confidence plots 0 Y0 k/ P& V0 R& ploess, regression, and penalized B-spline curves, and ellipses0 h4 l4 L7 Q( X
Distribution plots/ J: j- g$ r- n6 T @+ o$ ^" j! i
box plots, histograms, and normal and kernel density estimates5 `) d+ c2 l Z% b4 j' \' b
Categorization plots2 r) v1 Z" X5 n( c, K
dot plots, bar charts, and line plots! E, z% f! F) c& c( e3 Q1 A
Not all of the plot types can be used together in the same PROC SGPLOT step. The following table shows which of the plot types can be used together2 _$ ]/ ` l) D6 M
2 n" \/ l6 i* d5 E, c
2 ^4 _- d# {* P5 k' X* Gdata ex; ) r/ {6 f$ e% [2 y# Rinput x y ;% ?( g% i/ D0 c( ^2 l/ d
cards;5 C( p* B- }0 Z5 `4 P1 U* f0 U- d
1 2 8 l+ V" b, z* P3 \2 l2 7 ' g# c* P; x- j. t( {4 12 ) `4 ~ r( Z2 `& W3 u% C. D. G5 11 + m, E0 G! O; T6 95 n; P2 C, J1 g0 d8 V0 d
7 8# @$ m( \3 u2 i/ c9 @8 t- v/ Y h1 d
; , ~# j# v Y4 A! b* a5 h' ]title ; 5 _ K4 `: _9 T( m( I/ z8 s3 Sfootnote;/ d( L3 \- S1 Q- s6 k
proc sgplot data=ex noautolegend; 7 T0 d9 Z1 }' G3 P+ m; Z: ASERIES x=x y=y/LINEATTRS=(color=blue thickness=6) ;7 X- `% j5 O5 M
band x=x lower=0 upper=2.5 / OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE;+ d8 u( v9 |1 S% c
band x=x lower=2.5 upper=5 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE; : z1 E! b; ~5 q2 P5 |. w2 lband x=x lower=5 upper=7.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE; 1 ~) y1 l% g) R% b2 p" Xband x=x lower=7.5 upper=10 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE;6 M6 `/ n0 [) z( K' n1 k h
band x=x lower=10 upper=12.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE; 4 l& Q# U4 V& V" _% {7 Jyaxis values=(0 to 12 by 3) min=0 max=13 valueshint; 8 [0 I+ A7 w; x1 A% q6 N% _9 bxaxis values=(0 to 8 by 2) min=0 max=8 valueshint; % I: t) [+ R' B) rrun;- u' m8 ?: H S) D2 |
来源:数据挖掘学院