SAS中文论坛

标题: 请问高手proc sgplot中的pbspline语句有没有什么限制?谢谢! [打印本页]

作者: shiyiming    时间: 2011-11-1 23:57
标题: 请问高手proc sgplot中的pbspline语句有没有什么限制?谢谢!
语句是:
proc sgplot;
    pbspline x = y = / group =;
...
run;

在我的实际数据里,group = UP_DOWN。数据源是同一个,所用SAS程序是同一个,唯一的不同是样本数量。
一旦样本数量超过某个数字,就无法按group=分为几条不同颜色的线。

请高手指点,非常感谢!

下图是正常的结果,样本数量是5000:
[img:2cc91bjw]http://811.bbs.pinggu.com/forum/201111/01/1006358hh000a8ahogvg8p.jpg[/img:2cc91bjw]

下图是不正常的结果(无法按group分成2条不同颜色的线,样本数量是8000:
[img:2cc91bjw]http://811.bbs.pinggu.com/forum/201111/01/1006348kozulnunelu0kkd.jpg[/img:2cc91bjw]

[code:2cc91bjw]ods path sashelp.tmplmst(read) sasuser.templat(update);
proc template;
  define style XY;
     parent=Styles.Default;
  class GraphFonts /
   'GraphDataFont' = ("<sans-serif>, <MTsans-serif>",14pt)
        'GraphValueFont' = ("<sans-serif>, <MTsans-serif>",14pt)
        'GraphLabelFont' = ("<sans-serif>, <MTsans-serif>",14pt,bold)
        'GraphFootnoteFont' = ("<sans-serif>, <MTsans-serif>",12pt)
        'GraphTitleFont' = ("<sans-serif>, <MTsans-serif>",16pt,bold);
  class GraphColors /
   'ggrid' = cx808080;
  end;
run;
ods listing close;
ods graphics on / imagefmt = JPEG
       imagename = "ABC"
       antialias = off
       width = 7.5in
       height = 5.5in;
ods html gpath = "&_GraphPath"
    style = XY;
proc sgplot data = _raw noautolegend;
    pbspline x = &_X y = &_Y / group = &_by
   lineattrs = (pattern = solid thickness = 3)
   markerattrs = (color = grey symbol = CircleFilled size = 3pt) name = 'Y1';
  keylegend "Y1" / position = bottom across =6;
  xaxis values = (&_xaxis) grid;
  yaxis values = (&_yaxis) grid;
   title "&_Y vs. &_X";
run;
    ods html close;
ods graphics off;
ods trace off;
ods listing;[/code:2cc91bjw]




欢迎光临 SAS中文论坛 (http://mysas.net/forum/) Powered by Discuz! X3.2