# q: a5 m1 B- z1 X% N! J
本来准备在sgplot的band语句画区域作为背景来实现的,但是由于存在bar图与band不兼容的情况,于是只好转向anno了。见SAS公司详细说明。 ( ^) d% b. Z+ GThere are four basic types of plots that you can create with the SGPLOT procedure: 2 Q/ ~' c( n; G1 c0 v8 nBasic plots+ x: K) }: t2 R5 V% p2 u
scatter, series, step, band, needle, and vector plots7 ?% \5 L8 |& _2 X2 _8 k
Fit and confidence plots% }3 |, W5 f1 f' O, N6 \! Q3 I7 ]. F
loess, regression, and penalized B-spline curves, and ellipses + c9 e( C' @- H1 K" V8 `+ PDistribution plots % M, {. L1 K. O* s2 G& A# N8 z) F" kbox plots, histograms, and normal and kernel density estimates 1 d/ N/ M( \3 R4 d1 QCategorization plots! \) g7 d4 K5 r3 d3 r8 Y% k- e
dot plots, bar charts, and line plots& h4 K+ f0 r8 r9 I9 u! i+ b0 s% j
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 together3 l6 S" Q7 D9 V! p# y& s7 r) j9 Q& B
; c/ [& n" g. ?8 o3 F* [ - q. a% N- @" bdata ex; + @: C* W# \. m5 M$ a) `0 Ginput x y ;. E! {+ d/ a- R0 A% e5 i$ B
cards;# A- \9 B" |: I% p' Z
1 2 - a2 B- L4 z$ K* O, y4 E2 72 @. ~& A6 g& d5 s+ ]& T* l B1 x
4 12# c! U5 R+ J/ j- O3 Z
5 11 9 {; {! {7 I/ J6 9) q4 K: g- |. q0 o0 J" K
7 8 - q2 a+ s/ S( M+ T( V( U;5 F- [; k6 b* [5 {2 z- M8 l
title ;1 U& `2 J4 k4 ]! N9 ^$ g7 r6 X
footnote; 5 s& \; f8 T; s8 o- u: jproc sgplot data=ex noautolegend;( K6 \& z7 {# {8 @) W1 [8 V
SERIES x=x y=y/LINEATTRS=(color=blue thickness=6) ;5 B4 h5 f) a8 o6 f
band x=x lower=0 upper=2.5 / OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE;" e! J+ t& N+ i# y# W
band x=x lower=2.5 upper=5 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE;$ J D$ i3 Z2 Z" u) e; G0 d
band x=x lower=5 upper=7.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE;/ h7 K. B% f* X7 e4 W1 |
band x=x lower=7.5 upper=10 / OUTLINE transparency=.7 LINEATTRS=(color=black) fillattrs=(color=orange) NOOUTLINE; ' p1 F$ a# U6 Z6 d7 {1 c& gband x=x lower=10 upper=12.5 /OUTLINE transparency=.8 LINEATTRS=(color=black) fillattrs=(color=cxEEE3B4) NOOUTLINE; ) n. T) A, Q5 m. }yaxis values=(0 to 12 by 3) min=0 max=13 valueshint; ! _% v4 Q# `* S8 q3 j/ ~xaxis values=(0 to 8 by 2) min=0 max=8 valueshint; 1 d$ R6 f' i9 g+ s/ o' arun;. |0 r, m2 t; ]: v
来源:数据挖掘学院
作者: 平平凡凡的我 时间: 2011-12-30 14:34
不错的东东作者: alair003 时间: 2012-2-6 11:04
看看,肯定能学到不少东西~!~!~@!~!~!~!~8348932838256931作者: schnee 时间: 2012-2-6 16:53
顶!!!!!!!作者: jt202010 时间: 2012-2-19 10:45 作者: 老牦 时间: 2012-2-19 23:10
顶!!!!!!!作者: 飞雪灬无痕 时间: 2012-3-4 19:51
学习了。。。。。。。。作者: hahaysw 时间: 2012-3-10 09:53
不错的东西,数学中国做的图相当好看啊!作者: 540109558 时间: 2012-3-10 12:56
相当的不简单啊作者: 秋の名山で戦 时间: 2014-1-16 22:20
哇 太强了 效果相当好作者: 秋の名山で戦 时间: 2014-1-16 22:24
真心觉得是好贴 点128个赞作者: 空木葬花 时间: 2014-8-16 17:07
非常感谢楼主!