BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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;
4 REPLIES 4
Bill
Quartz | Level 8
add repeat=1 to the symbol statement to only use it once
deleted_user
Not applicable
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;
Bill
Quartz | Level 8
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;
deleted_user
Not applicable
Thank you! Now it works.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 625 views
  • 0 likes
  • 2 in conversation