简体   繁体   English

如何创建连接的 sas 线 plot 缺少数据的中断

[英]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.目前,如果我使用 sgplot 的 step 语句,它会显示为已连接。 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;

Nevermind, I think I figured it out, use series with break option.没关系,我想我想通了,使用带有中断选项的系列。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM