0

下面的代码产生下面的图片。如您所见,该group语句导致数据点的颜色不同。

问题:我怎样才能为两个组设置不同的符号?

   proc sgplot data=test;
        scatter x=time y=Y / group=group;
    run;

在此处输入图像描述


group   time    Y
0   0   10085.472039
0   0   10085.472039
0   0   10085.472039
0   1   9950.3642122
0   2   9817.0663279
0   4   9555.8037259
0   6   9301.4941325
0   8   9053.9525066
0   8   9053.9525066
0   8   9053.9525066
1   0   2954.7558871
1   0   2954.7558871
1   0   2954.7558871
1   1   2987.6191302
1   2   3020.8478832
1   4   3088.4182255
1   6   3157.4999815
1   8   3228.1269586
1   8   3228.1269586
1   8   3228.1269586
0   0   3929.2678194
0   0   3929.2678194
0   0   3929.2678194
0   1   3903.7639936
0   2   3878.4257063
0   4   3828.2414563
0   6   3778.7065572
0   8   3729.8126068
0   8   3729.8126068
0   8   3729.8126068
1   0   2694.5952697
1   0   2694.5952697
1   0   2694.5952697
1   1   2580.159876
1   2   2470.5843807
1   4   2265.1962804
1   6   2076.8827929
1   8   1904.2244475
1   8   1904.2244475
1   8   1904.2244475
4

1 回答 1

0

使用http://www.ats.ucla.edu/stat/sas/faq/gr2grps_new.htm

symbol1 v=star c=red h=1;
symbol2 v=triangle c=blue h=1;

proc gplot data=temp;
    plot y*time=group;
run;
quit;
于 2016-04-12T14:48:12.623 回答