0 y" X' Z& Z2 o6 @4 u* B% T8 Z本来准备在sgplot的band语句画区域作为背景来实现的,但是由于存在bar图与band不兼容的情况,于是只好转向anno了。见SAS公司详细说明。- f6 m7 y* W( r/ p1 Y% A6 m( \% _
There are four basic types of plots that you can create with the SGPLOT procedure: 8 c5 k, R2 a: r. e' uBasic plots& x% l2 {3 l4 k/ D$ F5 j8 c
scatter, series, step, band, needle, and vector plots # ?) X1 P' @, S$ {7 ~- m3 @4 o) NFit and confidence plots " e8 m$ ^( I) V8 S0 c. Xloess, regression, and penalized B-spline curves, and ellipses& j2 u! j: E8 Q2 o
Distribution plots 1 E. k+ p- e2 h% c8 m/ _box plots, histograms, and normal and kernel density estimates( m) V8 P# W# F$ H
Categorization plots ~4 B- F: V# e4 V% _- C
dot plots, bar charts, and line plots1 N# n) q, q4 a0 Y
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 together! J( I0 |. g: y O4 u8 D w( |+ y
# L$ Z9 G% i) @8 m; B * J) t6 j% U. a: qdata ex; 4 k0 m' I( Y7 r3 }& A6 m6 n# Minput x y ;0 e: D2 E, Z/ z
cards; - { f7 h: g; E. T1 2; F s2 `+ V3 g- ?, U2 n
2 7& d0 \: c; X8 p7 n1 n2 B
4 125 m& j" M# d& i" Y8 K9 f* h- u
5 11% X* q- Y/ Y3 g- ]3 a9 A
6 93 _' d* Y. g1 B) l
7 8, m, [0 a; \; \/ e6 ]" a4 {9 Q
;) P) ?+ y: Z1 e. e6 i s- k
title ; - V2 b, _/ G* t0 A* a; F7 o8 [footnote; : }* c$ E( e8 T' Eproc sgplot data=ex noautolegend;$ l A# p3 d# v' e8 {8 A
SERIES x=x y=y/LINEATTRS=(color=blue thickness=6) ; ~; A% i' n9 l" r4 e5 }! ^7 `band x=x lower=0 upper=2.5 / OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE;0 e8 q( b4 A, Q" V& K
band x=x lower=2.5 upper=5 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE;7 H" h, D2 D: g. k8 B+ Q% O
band x=x lower=5 upper=7.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE; " `! y: s) S; w0 q2 t1 iband x=x lower=7.5 upper=10 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE;1 p s! ^2 X- d6 S
band x=x lower=10 upper=12.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE;! k2 R7 O5 s* E9 I0 K
yaxis values=(0 to 12 by 3) min=0 max=13 valueshint; 3 ^( e5 X, I4 L4 R: {0 u2 jxaxis values=(0 to 8 by 2) min=0 max=8 valueshint; & U9 v" P5 X* L, d, P$ l+ l* rrun;, d' H$ n% [6 f) Y }3 z, `9 U7 Z+ c
来源:数据挖掘学院