Adding refline to SAS sgplot between 2 distinct values
<p>I have an sgplot that plots 2 series which I need to annotate with a number of lines.  I understand how to add standard reflines (see below), BUT</p>

<p>My problem is that I can't work out how to add a refline between 2 distinct points.  I.e a vertical dashed line at xaxis value of 50 between yaxis values 0 and -50.  I need to set the start and end of each line, not just the point on the axis it begins. </p>

<pre><code>proc sgplot data = all_sd_dplot noautolegend ;
by variablecode ;
where variablecode='V01'
and comparisonstudyid in (29318 29322);
series x=bin y= sigmavalue  / group=legendname name="series";
series x=bin y= fit  / group=legendname name="series" LINEATTRS= (color = black thickness=2);
yaxis values=(-160 to 20 by 20) label = "Accumulated minutes over baseline";
xaxis  values = (0 12 24 36 48 60) label = "Hours";
REFLINE 0 / AXIS= Y TRANSPARENCY = 0.2 LINEATTRS= (COLOR=black pattern=dot thickness=2); *baseline;
REFLINE 4 / AXIS= X TRANSPARENCY = 0.5 LINEATTRS= (COLOR=red); *end of SD;
REFLINE 0 / AXIS= X TRANSPARENCY = 0.5 LINEATTRS= (COLOR=blue); *start of SD;
REFLINE -135 / AXIS= Y TRANSPARENCY = 0.2 LINEATTRS= (COLOR=black pattern=dot thickness=2); *Y0;
run;
</code></pre>

<p>Any help would be much appreciated!!</p>