The SAS Output Delivery System and reporting techniques

A plot with with different lines

Reply
N/A
Posts: 0

A plot with with different lines

Dear all,

I want to create a plot with different linetypes (kind of lines).
I define two symbols. But always I get plots with lines from symbol1.
I should looks similar like http://cnx.org/content/m11242/latest/seq.png or http://www.kumamoto-u.ac.jp/seeds/seeds/25000217/images/img_main1.gif

S1 and S2 are my borders which I create with an algorthm. These are not a usual confidenceintervall.

Lex



proc gplot data=xyz;
symbol1 i=stepjr;
symbol2 i=join;
plot y*x=1 (s1 s2)*x=2 /overlay
;

run;
Super Contributor
Posts: 291

Re: A plot with with different lines

Posted in reply to deleted_user
add repeat=1 to the symbol statement to only use it once
N/A
Posts: 0

Re: A plot with with different lines

I had add it. But it dosnt work. Perhaps I made an other mistake. My hole SAS code:

data a;
INPUT obs i;
CARDS;
1 1
2 0
3 1
4 1
5 0
6 0
7 0
8 1
9 0
10 1
run;
data a;
set a;
i_sum+i;
run;

data a;
set b;
%let a=0.001;
%let b=0.2;
%let p1=0.1;
%let p2=0.2;
%let q=log(&p2*(1-&p1)/&p1*(1-&p2));
%let h1=log(&b/(1-&a))/&q;
%let h2=log((1-&b)/&a)/&q;
q=&q;
h1=&h1;
h2=&h2;
s=log((1-&p1)/(1-&p2))/&q;
d1=&h1+s*obs;
d2=&h2+s*obs;
run;


proc gplot data=a;
title 'test';
symbol1 i=stepjl repeat=1;
symbol2 i=join;
plot i_sum*obs=1 (d1 d2)*obs=2 /overlay;
run;
Super Contributor
Posts: 291

Re: A plot with with different lines

Posted in reply to deleted_user
I missed the fact that you would also be cycling through the colours list. Add c=blue to symbol1 and then it will only be used once. You can remove the r= option. Revised code below.

data a;
INPUT obs i;
i_sum+i;
%let a=0.001;
%let b=0.2;
%let p1=0.1;
%let p2=0.2;
%let q=log(&p2*(1-&p1)/&p1*(1-&p2));
%let h1=log(&b/(1-&a))/&q;
%let h2=log((1-&b)/&a)/&q;
q=&q;
h1=&h1;
h2=&h2;
s=log((1-&p1)/(1-&p2))/&q;
d1=&h1+s*obs;
d2=&h2+s*obs;

CARDS;
1 1
2 0
3 1
4 1
5 0
6 0
7 0
8 1
9 0
10 1
;
run;

goptions reset=all dev=win;

title 'test';
symbol1 i=stepjl c=blue;
symbol2 i=join;

proc gplot data=a;
plot i_sum*obs=1 (d1 d2)*obs=2 /overlay;
run;
quit;
N/A
Posts: 0

Re: A plot with with different lines

Thank you! Now it works.
Ask a Question
Discussion stats
  • 4 replies
  • 148 views
  • 0 likes
  • 2 in conversation