<?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: Highlight the part of the lines when corresponding p-values are statistically signifiant in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578836#M18625</link>
    <description>&lt;P&gt;Put a NAME= on the SERIES you want in the legend (e.g. NAME="mySeries"), and add the following statement to the proc:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;keylegend "mySeries";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a TITLE on it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;keylegend "mySeries" / title="My Group Title";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 21:20:33 GMT</pubDate>
    <dc:creator>DanH_sas</dc:creator>
    <dc:date>2019-08-02T21:20:33Z</dc:date>
    <item>
      <title>Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578824#M18619</link>
      <description>&lt;P&gt;Hi Folks:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to highlight the part of the lines when corresponding p-values are statistically signifiant. Desired graph would have the line parts that are associated with 95% CI not inclusive of 1 bolded or bolded/dashed in a way that is more prominent than the line parts that are not significant.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any technical possibilities there and know how?&lt;/P&gt;
&lt;P&gt;Your help is greatly appreciated.&lt;/P&gt;
&lt;P&gt;Data attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31482i251AE1B4A3877EDD/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel2.png" alt="SGPanel2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
ods graphics/width=10in height=4in;
proc sgpanel data=p.PAR_PANC_FU;
panelby agegrp/ novarname columns=4 rows=1;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=FU y=HazardRatio/group=stage lineattrs=(pattern=solid) LEGENDLABEL='HAZARD RATIO' lineattrs=(thickness=2);
keylegend/ title="Catgeories" position=TOP;
REFLINE 1 / LABEL = (' ') lineattrs=(color=black pattern=dash thickness=1.5); 
colaxis label='Weeks' min=1 max=100 grid values=(0 to 52 by 1);
rowaxis label='Hazar Ratio' 
fitpolicy=thin grid  values=(0.93 to 1.5 by 0.01);
/*INSET N PROBF/position=TOPRIGHT TEXTATTRS=(Color=BLUE Family=Arial Size=10)*/
title " ";
run;

data sig; set Par_panc_fu;
length one $8; 
if HRLowerCL&amp;gt;1 and HRUpperCL&amp;gt;1 then one='over'; else
if HRLowerCL&amp;lt;1 and HRUpperCL&amp;lt;1 then one='under'; else
one='non_sig';
run; 

proc print data=sig;
where one ne 'non_sig';
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 20:41:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578824#M18619</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-02T20:41:38Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578827#M18620</link>
      <description>Add an overlay of a band or a thicker line for parts that are significant. &lt;BR /&gt;Create a new variable that is the same as the graphed values but only present when the data is significant. Then graph that series using a bolder line structure or band so that it shows up more on the graph. It'll be overlaid so no issues otherwise.</description>
      <pubDate>Fri, 02 Aug 2019 20:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578827#M18620</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-02T20:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578829#M18621</link>
      <description>Reeza, do you have time to show me in code?</description>
      <pubDate>Fri, 02 Aug 2019 20:51:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578829#M18621</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-02T20:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578830#M18622</link>
      <description>&lt;P&gt;I think it's something you can do yourself. And I can't download attachments so can't work with data or anything.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Create a new variable with only significant values notes (IF/THEN statement most likely)&lt;/P&gt;
&lt;P&gt;2. Add a new series statement, referring to the new variable and specifying a thicker line. Not exactly sure how that will work with SGPANEL but should be fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's one approach, there are likely others.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 20:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578830#M18622</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-02T20:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578833#M18623</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worked as shown below. Thank you!!!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="worked.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31484iAF218EC008E6486E/image-size/large?v=v2&amp;amp;px=999" role="button" title="worked.png" alt="worked.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

ods graphics/width=10in height=4in;
proc sgpanel data=p.sig;
panelby agegrp/ novarname columns=4 rows=1;
styleattrs DATACONTRASTCOLORS=(BLUE green red);
series  x=FU y=HazardRatio/group=stage lineattrs=(pattern=solid) LEGENDLABEL='HAZARD RATIO' lineattrs=(thickness=1);
series  x=FU y=one/group=stage lineattrs=(pattern=dash) lineattrs=(thickness=3);
keylegend/ title="Categories" position=TOP;
REFLINE 1 / LABEL = (' ') lineattrs=(color=black pattern=dash thickness=1.5); 
colaxis label='Weeks' min=1 max=100 grid values=(0 to 52 by 1);
rowaxis label='Hazard Ratio' 
fitpolicy=thin grid  values=(0.93 to 1.5 by 0.01);
INSET N PROBF/position=TOPRIGHT TEXTATTRS=(Color=BLUE Family=Arial Size=10)
BORDER;
title " ";
/*format stage stage. agegrp agegrp.; */
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Aug 2019 21:11:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578833#M18623</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-02T21:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578835#M18624</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to get rid of the legend for the dashed lines ?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 21:16:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578835#M18624</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-02T21:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578836#M18625</link>
      <description>&lt;P&gt;Put a NAME= on the SERIES you want in the legend (e.g. NAME="mySeries"), and add the following statement to the proc:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;keylegend "mySeries";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a TITLE on it:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;keylegend "mySeries" / title="My Group Title";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 21:20:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578836#M18625</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2019-08-02T21:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578839#M18626</link>
      <description>&lt;P&gt;Great. Solved the problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGPanel11.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31485i20B425A565CF4CED/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGPanel11.png" alt="SGPanel11.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and the final code is following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics/width=10in height=4in;
proc sgpanel data=p.sig;
panelby agegrp / novarname columns=4 rows=1 ;
styleattrs DATACONTRASTCOLORS=(BLUE green red);

series  x=FU y=HazardRatio/group=stage lineattrs=(pattern=solid) LEGENDLABEL='HAZARD RATIO' lineattrs=(thickness=1)
name="mySeries";
 
series  x=FU y=one/group=stage lineattrs=(pattern=dash) lineattrs=(thickness=3);

keylegend "mySeries"/ title="Categories" position=TOP;

REFLINE 1 / LABEL = (' ') lineattrs=(color=black pattern=dash thickness=1.5); 
colaxis label='Weeks ' min=1 max=100 grid values=(0 to 52 by 1);
rowaxis label='Hazard Ratio' 
fitpolicy=thin grid  values=(0.93 to 1.5 by 0.01);
INSET N PROBF/position=TOPRIGHT TEXTATTRS=(Color=BLUE Family=Arial Size=10)
BORDER;
title " ";
/*format stage stage. agegrp agegrp.; */
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Aug 2019 21:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578839#M18626</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-08-02T21:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578841#M18627</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/132289"&gt;@Cruise&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to get rid of the legend for the dashed lines ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt;&amp;nbsp;already answered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did have the thought as I saw your result post, "Hmmm, I wonder if he's going to want to remove the dashes from the legend?".&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 22:55:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578841#M18627</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-08-02T22:55:55Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578895#M18628</link>
      <description>&lt;P&gt;How about this one ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data air;
 set sashelp.air;
 year=year(date);
 group=(month(date)&amp;gt;5);
 if year in (1951 1952);
 run;
 
 proc print;run;
 
 ods graphics/attrpriority=none;
 proc sgpanel data=air;
 panelby year/rows=1 novarname;
 styleattrs datacontrastcolors=(green red) datalinepatterns=(dash solid) ;
 series x=date y=air/group=group;
 run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31504iA427587D271C4D9E/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.png" alt="x.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2019 11:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578895#M18628</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-08-03T11:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight the part of the lines when corresponding p-values are statistically signifiant</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578927#M18631</link>
      <description>The OP's graph already includes a GROUP statement which means more data manipulation is required to handle that &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Sat, 03 Aug 2019 18:11:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Highlight-the-part-of-the-lines-when-corresponding-p-values-are/m-p/578927#M18631</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-08-03T18:11:19Z</dc:date>
    </item>
  </channel>
</rss>

