全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 SAS专版
6645 14
2012-10-25
悬赏 50 个论坛币 已解决
复制代码
a.jpg
上述程序做出的图如图示,y轴与x轴相交于x=1处,如何使y轴与x=1.5处相交,并且x<1.5处仍然有刻度,图中的点仍然显示。order=(1.5 to 5 by 0.5) 的axis选项,可以从x=1.5处开始,但<1.5的点和坐标轴就没有了,这不是我想要的。
求高手,悬赏50币

最佳答案

davil2000 查看完整内容

/*--- 斑竹江湖令 及时单骑赶到 ---*/ data a; input x y @@; cards; 1 2 2 4 3 8 4 9 5 13 ; data anno; length function $ 8; retain xsys '2' ysys '3' color 'black' when 'a'; do i= 0 to 15 by .25; if (i+1)/int(i+1)=1 then do; tkht=2; text=left(put(i,2.)); end; else do; tkht=1; text=''; end; function='move'; y=i; x=1.5; output; function= ...
二维码

扫码加我 拉你入群

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

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

全部回复
2012-10-25 14:02:32
/*--- 斑竹江湖令 及时单骑赶到 ---*/
data a;
input x y @@;
cards;
1 2 2 4 3 8 4 9 5 13
;
data  anno;
length  function $ 8;
retain  xsys '2' ysys '3' color 'black' when 'a';
do  i= 0 to 15 by .25;
  if (i+1)/int(i+1)=1 then
   do;
    tkht=2;
    text=left(put(i,2.));
   end;
  else
   do;
    tkht=1;
    text='';
   end;
  function='move';  y=i;  x=1.5;    output;
  function='draw';  y=i;  x=1.5-tkht/20; output;
  function='label'; y=i;  x=1.5;    output;
end;
run;

title1 "Move the Y axis to the middle of the graph";
axis1 origin=(15,15)pct   major=none   minor=none  length=60pct  
   order=(0 to 15 by 5) offset=(0,0) label=none  value=none color=white;
axis2 origin=(45,15)pct major=(h=-1) minor=(n=3 h=-.5) length=60pct
   order=(0 to 15 by 5) offset=(0,0);
axis3 origin=(15,15)pct   major=(h=-1)   minor=none  length=60 pct
   order=(-2 to 5 by 1)  offset=(0,0)  label=none ;
symbol1 i=j v=dot c=blue;
proc  gplot  data=a;
plot  y *x / vaxis=axis1 haxis=axis3 noframe href=1.5 vref=0 ;
plot2 y *x / vaxis=axis2 ;
run;
quit;


二维码

扫码加我 拉你入群

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

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

2012-10-25 14:11:46
二维码

扫码加我 拉你入群

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

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

2012-10-25 15:10:58
it is really a good but hard question!
二维码

扫码加我 拉你入群

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

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

2012-10-25 15:13:30
数据分析师3K 发表于 2012-10-25 15:10
it is really a good but hard question!
求高手援助一把!实在着急啊,这个问题
二维码

扫码加我 拉你入群

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

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

2012-10-25 15:51:26
在1.5处加一条垂直线不行吗?
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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