turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- ODS and Base Reporting
- /
- A plot with with different lines

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

04-29-2009 05:46 AM

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;

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;

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

04-29-2009 09:18 AM

add repeat=1 to the symbol statement to only use it once

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Bill

04-29-2009 11:00 AM

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;

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;

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to deleted_user

04-30-2009 09:11 AM

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;

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;

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Bill

05-05-2009 03:41 AM

Thank you! Now it works.