楼主: crazebird
2820 13

[SAS EM] SAS 多个NLIN过程放一张图中,做PLOT图求教 [推广有奖]

11
crazebird 发表于 2019-3-12 11:18:19
whymath 发表于 2019-3-8 23:11
帮你改好了,把数据填充完整就可以得到你给出的结果了
大神,您太厉害了,太感谢您了,现在还有一个问题,比如有6组数据,图例能否只显示其中的5组,另外一组不在图例中展示,底下的代码不对,还是全部显示
proc gplot data = expout;
plot y*x ygs*x z*x o*x ygsa*x ygsb*x /haxis=axis1 vaxis=axis2 overlay noframe legend=legend1 hminor=0;
symbol1 i=none v=dot cv=red h=2.5 w=2;
symbol2 i=spline v=none l=1 h=2.5 w=2.5;
symbol3 i=none v=star cv=blue h=2.5 w=2;
symbol4 i=none v=plus cv=green h=2.5 w=2;
symbol5 i=spline v=none l=3 h=2.5 w=2.5;
symbol6 i=spline v=none l=2 h=2.5 w=2.5;
legend1 down=3 position=(top right inside) frame
label=(f=calibri h=1.5 "") value=(f=calibri "" "LO" "DO" "WO" "DO" "EE");
axis1 minor=(number=1) order=(20 to 120 by 20) label=(h=13pt f="calibri" "Body Weight (kg)") ;
axis2 minor=(number=1) order=(0 to 12000 by 2000) label=(h=13pt a=90 r=0 f=calibri "NE Intake (kcal/day)");
run;
quit;

12
whymath 发表于 2019-3-13 22:52:02
crazebird 发表于 2019-3-12 11:11
大神,真的是太感谢你了,太厉害了,现在还有一个问题,图例 legend,能否让其只显示想要展示的图例 ...
可以使用名称参考句法,例如:
  1. proc sgplot data = sashelp.class;
  2.         scatter x = height y = weight / group = sex name="plot1";
  3.         scatter x = height y = weight / group = age name="plot2";
  4.         keylegend "plot2";
  5. run;       
复制代码

13
crazebird 发表于 2019-3-15 13:53:33
whymath 发表于 2019-3-13 22:52
可以使用名称参考句法,例如:
嗯,好的,我试试,非常感谢

14
crazebird 发表于 2019-3-15 13:53:39
whymath 发表于 2019-3-13 22:52
可以使用名称参考句法,例如:
嗯,好的,我试试,非常感谢

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-29 17:28