( q. A" K @: ]4 `
本来准备在sgplot的band语句画区域作为背景来实现的,但是由于存在bar图与band不兼容的情况,于是只好转向anno了。见SAS公司详细说明。 * j% g& `% I1 O7 @* B" r& H3 ^There are four basic types of plots that you can create with the SGPLOT procedure:0 G" m8 y0 }, N8 ^" H
Basic plots3 D Z3 C+ @1 [. @+ J% E
scatter, series, step, band, needle, and vector plots ! L& r% k$ u. s5 Q4 wFit and confidence plots' I9 B) {# o' D, `: e% s5 W" L; @
loess, regression, and penalized B-spline curves, and ellipses ; G) q8 b2 J j8 SDistribution plots ) V. j3 g. k0 c7 Z' @box plots, histograms, and normal and kernel density estimates ( ]( f7 K. Q: a6 tCategorization plots 3 h: J' ^/ t+ ~$ x4 Hdot plots, bar charts, and line plots# w# M9 |+ T. I) ?, b3 F
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: s/ H2 C) v6 v. Y: G
! O1 m$ N6 U# o" i9 O$ c
1 u. C9 ~8 P2 O1 j, G+ r- [# s* adata ex; 0 u) F, e/ `8 m7 T# w% D% B6 e5 Jinput x y ; 6 ?) R6 P7 Q4 g! v" C& o; U5 K: h2 bcards;% P S6 g! S- V; Y& v3 H
1 2, F# Z9 W( D# P& ]) T+ @
2 7 3 h/ E- { w* C4 12 6 U/ Y1 T4 D. B- `6 V8 Y/ E/ Z! r5 119 q% d9 O/ a: v5 H; i1 `0 [
6 9! M# Z- f" k4 Z) ^
7 8 4 A. I) t4 B- r0 U1 j S* k( x; 9 F5 k3 V4 F( m: u) i( P" \title ;2 f, w( o3 b1 S/ c! \9 N- q' D& i8 ?, Y
footnote; + [& @- u( U0 `proc sgplot data=ex noautolegend; / I1 e" ~! v1 k7 W! ], S% t3 o5 CSERIES x=x y=y/LINEATTRS=(color=blue thickness=6) ;" C: q& q& s* v$ o. b
band x=x lower=0 upper=2.5 / OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE;5 o: U5 |( c# F. K/ N& M
band x=x lower=2.5 upper=5 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE; 7 {, y" `( s5 G+ S& ~6 cband x=x lower=5 upper=7.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE; r; ^0 v+ v w
band x=x lower=7.5 upper=10 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE; , F: Q/ x2 i, o2 V- hband x=x lower=10 upper=12.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE; & V1 B. @& Z7 ~) Fyaxis values=(0 to 12 by 3) min=0 max=13 valueshint;+ E; @, q9 E; J# X
xaxis values=(0 to 8 by 2) min=0 max=8 valueshint;- x V2 R. H- U, r% P- Z) w
run; : U a4 V+ z$ E% \4 E% U来源:数据挖掘学院