Karen L
Karen L

Reputation: 31

How to create connected sas line plot with breaks for missing data

I have diary data with a day a row, but some days are missing. I want the missing days to be shown as broken in the lines. Currently if I use sgplot's step statement, it is shown as connected. Any idea? Here is a simplified sample data


data diary;
   infile datalines delimiter=','; 
   input subjid $ day aval;
   datalines;                      
John,1,10
John,2,10
John,3,11
John,5,15
John,6,15
John,10,15
John,11,15
John,12,15
;

proc sgplot data=diary;
    step x=day y=aval;
    run;

Upvotes: 1

Views: 432

Answers (1)

Karen L
Karen L

Reputation: 31

Nevermind, I think I figured it out, use series with break option.

Upvotes: 1

Related Questions