全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
1520 1
2013-06-03
我的程序如下,但是第二个曲线为何不显示虚线呢?

proc fcmp outlib=sasuser.funcs.math_stat;

  function g(u);
    if (u le  -0.25) then return (2*log((1+0.25*0.25)/(1+1.25*1.25)));
    if (u ge   1.25) then return (2*log((1+1.25*1.25)/(1+0.25*0.25)));
      else return(2*log((1+u*u)/(1+(u-1)*(u-1))));
  endsub;
run;

proc fcmp outlib=sasuser.funcs.math_stat;

  function f(u);
    return(2*log((1+u*u)/(1+(u-1)*(u-1))));
  endsub;
run;

options cmplib =sasuser.funcs;
data a;
do x=-5 to 5 by 0.01;
l=f(x);
lstar=g(x);
output;
end;
run;

proc gplot data=a;
plot l*x=1 lstar*x=2/overlay;
symbol1 i=join v=none;
symbol2 line=3;
label l='lr';
run;


二维码

扫码加我 拉你入群

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

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

全部回复
2013-6-3 22:01:10
The symbol statement doesn't work well without color specifications. I forgot the reason somebody mentioned long time ago.
/*
Controlling Consecutive SYMBOL StatementsIf you specify consecutively numbered SYMBOL statements and you want SAS/GRAPH to use each definition only once, use color specifications to ensure that each SYMBOL statement generates only one symbol definition. You can do the following actions:
  • specify colors on each SYMBOL statement, using the COLOR=, CI=, CV=, or CO= options. This method lets you explicitly assign colors for each definition. For example, these statements generate four definitions: symbol1 value=star color=green;symbol2 value=square color=yellow;symbol3 value=special color=cyan;symbol4 value=special color=orange;

  • specify a default color for all SYMBOL statements using the CSYMBOL= option in the GOPTIONS statement. This method makes it easy to specify the same color for each definition when you do not need more explicit color specifications.

  • limit the color list to a single color using the COLORS= option in the GOPTIONS statement. This method makes it easy to specify the same color for each definition when you want the color to apply to other definitions also, such as PATTERN definitions*/





复制代码
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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