Hi All, I am creating a timeline graph for a presentation for my internship involving the duration of participation for various customers of an app. Variables that I have are the customer names (full_name), first week of participation (firstweekno), last week of participation (lastweekno), and duration of participation (dur_weeks). data duration;
input full_name firstweekno lastweekno dur_weeks Linetype;
datalines;
SusieQueen 0 3 4
BillyJohnson 5 5 1
JonBonJovi 1 9 9
MaggieSimpson 2 8 7
EllisGrey 5 7 3
;
run; I'm using proc gplot and the annotate statement to create a timeline graph. The variables I'm currently using are full_name, firstweekno, and lastweekno. data anno;
length function color $8;
retain xsys ysys '2' size 1 color 'red';
set duration;
function='move'; x=firstweekno; yc = full_name; output;
function='draw'; x=lastweekno; yc = full_name; output;
function='symbol'; text='dot';output;
run;
axis1 label=('Customer Duration of Participation') order= (0 to 32 by 1) minor=none;
axis2 label=('Customer Name');
symbol1 i=none;
title1 'Time Line';
proc gplot data=duration;
plot full_name*lastweekno / anno=anno;
label full_name= 'Customer Name';
label lastweekno= 'Duration of Participation by Week Number';
title 'Customer Duration of Participation';
run;
quit; I like the graph that I get with this code, but I want to label each observation with the duration variable (dur_weeks). Is this possible? If yes, can I use my existing code or am I going to need to start from scratch? Thank you for any and all help! Meeder
... View more