全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
4656 5
2015-05-02
如果我有个程序是这样的:
proc sgplot data=aa;
by year;
scatter x=xx y=yy/group=zz;
run;

请问我如果设置group的颜色,比如对于每个Year的图, group=1 的时候是红色, group=2的时候是蓝色。
如果不自己设置颜色,对于不同年份而言,有时候group=1 的时候是红色,有时候group=2 的时候是红色。自己倒腾了好长时间也没有弄出来,特来请教。谢谢了。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-5-3 09:41:56
继续求大牛们帮忙
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-5-4 13:14:36
First of all, you need to tell the colors you need in your plot. More than that, For your case, BY statement may complicate the situation since each BY may not have equal levels of group variable. I had an example in my blog. You can either google %modStyle or visit my blog to figure out your question.

JingJu
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-5-5 00:24:51
jingju11 发表于 2015-5-4 13:14
First of all, you need to tell the colors you need in your plot. More than that, For your case, BY s ...
to followup, I have made my blog updated on this thread

JingJu
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-5-5 22:17:13
jingju11 发表于 2015-5-5 00:24
to followup, I have made my blog updated on this thread

JingJu
Thank you very much. I will let you know whether I can get it or not after I read your post.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2015-5-6 06:43:41
To Jingju,

Your code meets my needs. Thank you so much.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群