<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AE Highlow plot with treatment period as background (Block plot) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686276#M208207</link>
    <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EX;
	length USUBJID DOSE $200;
	USUBJID='subj1';
	DOSE='225ug';EXSTDY=  1;EXENDY= 67;output;
	DOSE='N/A  ';EXSTDY= 67;EXENDY= 88;output;
	DOSE='75ug ';EXSTDY= 88;EXENDY=148;output;	
	DOSE='N/A  ';EXSTDY=148;EXENDY=175;output;
	DOSE='225ug';EXSTDY=175;EXENDY=177;output;		
run;

...

proc sgplot data=AE_EX;
	block  x=EXSTDY block=DOSE/name='EX' transparency=0.5 filltype=alternatelternate ;
	highlow y=AEDECOD high=AEENDY low=AESTDY/type=bar barwidth=0.8 fillattrs=(color=yellow);
	yaxis grid display=(noticks nolabel)  valueattrs=(color=gray size=10pt)	;
	xaxis grid label="Study Days" 
		  labelattrs=(color=black size=10pt)
		  valueattrs=(color=gray size=10pt) 
		  offsetmax=0.02 values=(0 to 190 by 10)
	      ;		
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorChrisNZ_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorChrisNZ_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49739i6815AE88A7C99B73/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Sep 2020 23:36:23 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-09-24T23:36:23Z</dc:date>
    <item>
      <title>AE Highlow plot with treatment period as background (Block plot)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/685721#M208014</link>
      <description>&lt;P&gt;Hi, I have a Highlow plot for AEDECOD in term of study days for AE (AESTDY). I also want to add different treatment periods as a background using Block plot. After reading Sanjay's "The Block Plot" (&lt;A href="https://blogs.sas.com/content/graphicallyspeaking/2014/04/14/the-block-plot/" target="_blank"&gt;https://blogs.sas.com/content/graphicallyspeaking/2014/04/14/the-block-plot/&lt;/A&gt;) I still did not know how to make it work. (1) I did not merge both datasets, instead I set them. (2) since EX did have periods without any treatment, I did not know how to reflect it. For example, dose 225ug starts day 1 and ends day 67. Next dose 75ug actually starts day 88. Ideally I would like day 68 to 87 to be blank in the graph. But current code did not do that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the code. Thanks a lot for help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data ae;
	length USUBJID AEDECOD $200;
	USUBJID='subj1';
	AEDECOD='Nasopharyngitis';aestdy=18;aeendy=26;output;
	AEDECOD='Sinusitis';aestdy=90;aeendy=105;output;
	AEDECOD='Headache';aestdy=176;aeendy=178;output;
run;

data ex;
	length USUBJID dose $200;
	USUBJID='subj1';
	dose='225ug';exstdy=1;exendy=67;output;
	dose='75ug';exstdy=88;exendy=148;output;	
	dose='225ug';exstdy=175;exendy=177;output;		
run;
&lt;BR /&gt;proc sort data=ae;by USUBJID aestdy;run;&lt;BR /&gt;proc sort data=ex;by USUBJID exstdy;run;&lt;BR /&gt;
data ae_ex;
      set ae ex;
run;

proc sgplot data=ae_ex;
	block x=exstdy block=dose/name='EX' transparency=0.5 
/*    	valueHalign=center valueValign=top */
/*        FillType=alternate AltFillAttrs=(transparency=1)*/
        ;
	highlow y=AEDECOD high=aeendy low=aestdy/type=bar barwidth=0.8 fillattrs=(color=yellow);
	yaxis grid display=(noticks nolabel) 
		valueattrs=(color=gray size=10pt)
		;
	xaxis grid label="Study Days" 
		labelattrs=(color=black size=10pt)
		valueattrs=(color=gray size=10pt) 
		offsetmax=0.02 values=(-10 to 190)
		;		
run;

&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Sep 2020 14:35:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/685721#M208014</guid>
      <dc:creator>jsbyxws</dc:creator>
      <dc:date>2020-09-22T14:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: AE Highlow plot with treatment period as background (Block plot)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686276#M208207</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EX;
	length USUBJID DOSE $200;
	USUBJID='subj1';
	DOSE='225ug';EXSTDY=  1;EXENDY= 67;output;
	DOSE='N/A  ';EXSTDY= 67;EXENDY= 88;output;
	DOSE='75ug ';EXSTDY= 88;EXENDY=148;output;	
	DOSE='N/A  ';EXSTDY=148;EXENDY=175;output;
	DOSE='225ug';EXSTDY=175;EXENDY=177;output;		
run;

...

proc sgplot data=AE_EX;
	block  x=EXSTDY block=DOSE/name='EX' transparency=0.5 filltype=alternatelternate ;
	highlow y=AEDECOD high=AEENDY low=AESTDY/type=bar barwidth=0.8 fillattrs=(color=yellow);
	yaxis grid display=(noticks nolabel)  valueattrs=(color=gray size=10pt)	;
	xaxis grid label="Study Days" 
		  labelattrs=(color=black size=10pt)
		  valueattrs=(color=gray size=10pt) 
		  offsetmax=0.02 values=(0 to 190 by 10)
	      ;		
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;DIV id="tinyMceEditorChrisNZ_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="tinyMceEditorChrisNZ_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 640px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49739i6815AE88A7C99B73/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 23:36:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686276#M208207</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-24T23:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: AE Highlow plot with treatment period as background (Block plot)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686365#M208255</link>
      <description>&lt;P&gt;Hi ChrisNZ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for help! Yes, I think this worked. In addition, I will add EXSTDY=0 and EXSTDY=178 with TRTA='N/A' so that both start and end are 'N/A'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW, is there any way to assign colors for TRTA? For example, white for N/A, green for 25ug, blue for 75ug, red for 225ug? It puzzled me since BLOCK plot did not seem to have a group= option.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 13:22:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686365#M208255</guid>
      <dc:creator>jsbyxws</dc:creator>
      <dc:date>2020-09-24T13:22:17Z</dc:date>
    </item>
    <item>
      <title>Re: AE Highlow plot with treatment period as background (Block plot)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686576#M208375</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;is there any way to assign colors for TRTA?&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;You need to change the colours of&amp;nbsp;GraphData1 -&amp;nbsp;GraphData&lt;EM&gt;n&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;See here&amp;nbsp;&lt;A href="https://support.sas.com/rnd/datavisualization/gtl/concepts_sect5.htm" target="_blank"&gt;https://support.sas.com/rnd/datavisualization/gtl/concepts_sect5.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 23:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/AE-Highlow-plot-with-treatment-period-as-background-Block-plot/m-p/686576#M208375</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-24T23:38:31Z</dc:date>
    </item>
  </channel>
</rss>

