<?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 Add Full Borders around graph with SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Add-Full-Borders-around-graph-with-SGPLOT/m-p/961262#M25337</link>
    <description>&lt;P&gt;I want to add a full border around the the graph I'm making in sgplot. I have a line for the X and Y graph but can't find a any solution to add a line for the top and right side the like the example below that has a full box around the graph. The code below is what I'm using to create the graphs. Thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ch2f1.gif" style="width: 475px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105275i15201E7E5C4E5C1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="ch2f1.gif" alt="ch2f1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;%macro kapsur(title,group,trantype,whereStatement);&lt;BR /&gt;title "&amp;amp;Title";&lt;BR /&gt;%ProvideSurvivalMacros;&lt;BR /&gt;%let TitleText0 = "&amp;amp;title";&lt;BR /&gt;%let TitleText1 = &amp;amp;titletext0 " for " STRATUMID; &lt;BR /&gt;%let TitleText2 = &amp;amp;titletext0;&lt;BR /&gt;%let InsetOpts = autoalign=(BottomRight) border=true BackgroundColor=GraphWalls:Color Opaque=true; &lt;BR /&gt;%let LegendOpts = title=GROUPNAME location=inside across=1 autoalign=(BottomLeft); &lt;BR /&gt;%let StepOpts = lineattrs=(thickness=2.5);&lt;BR /&gt;%CompileSurvivalTemplates; &lt;BR /&gt;ods output Survivalplot=SurvivalPlotData;&lt;BR /&gt;%if %isBlank(&amp;amp;whereStatement) and &amp;amp;group = AlloType %then %do;&lt;BR /&gt;proc lifetest data=bmt2 (where=(TransplantDate &amp;gt;= '01Jan2020'd and TransplantDate &amp;lt;= '31Dec2023'd and AllTransplantTypes = "&amp;amp;trantype")) &lt;BR /&gt;plots=survival(strata=panel) notable; &lt;BR /&gt;time SurvivalTime * nonsurvival(0); &lt;BR /&gt;strata &amp;amp;group; &lt;BR /&gt;&amp;amp;whereStatement;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;proc lifetest data=bmt2 (where=(TransplantDate &amp;gt;= '01Jan2020'd and TransplantDate &amp;lt;= '31Dec2023'd and AllTransplantTypes = "&amp;amp;trantype")) &lt;BR /&gt;plots=survival notable; &lt;BR /&gt;time SurvivalTime * nonsurvival(0); &lt;BR /&gt;strata &amp;amp;group; &lt;BR /&gt;&amp;amp;whereStatement;&lt;BR /&gt;run;&lt;BR /&gt;ods output close;&lt;BR /&gt;proc sort data=Survivalplotdata; by Stratum time; run;&lt;BR /&gt;data Survivalplotdata; set Survivalplotdata;; by stratum time notsorted; if last.stratum and last.time then label=stratum; run;&lt;BR /&gt;title "&amp;amp;Title";&lt;BR /&gt;%if %isBlank(&amp;amp;whereStatement) %then %do;&lt;BR /&gt;proc sgplot data=SurvivalPlotData noborder;&lt;BR /&gt;styleattrs axisextent=data;&lt;BR /&gt;/* dropline x=0 y=0.2 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.4 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.6 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.8 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=1.0 / dropto=y;*/&lt;BR /&gt;/* step x=time y=survival / group=stratum name='s' curvelabel curvelabelpos=auto curvelabelloc=inside; *Line Graph;*/&lt;BR /&gt;step x=time y=survival / group=stratum name='s' datalabel=label lineattrs=(thickness=2.5px); *Line Graph;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name='c'; *Censored Label;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum; *HashMarks;&lt;BR /&gt;/* xaxistable atrisk / x=atrisk class=stratum colorgroup=stratum valueattrs=(weight=bold); *At risk Table;*/&lt;BR /&gt;keylegend 'c' / location=inside position=bottomright;&lt;BR /&gt;keylegend 's' / location=inside position=bottomleft across=1;&lt;BR /&gt;yaxis TICKSTYLE=OUTSIDE min=0 max=1;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%else %do;&lt;BR /&gt;proc sgplot data=SurvivalPlotData noborder;&lt;BR /&gt;styleattrs axisextent=data;&lt;BR /&gt;/* dropline x=0 y=0.2 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.4 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.6 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.8 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=1.0 / dropto=y;*/&lt;BR /&gt;step x=time y=survival / group=stratum name='s' lineattrs=(thickness=2.5px); *Line Graph;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name='c'; *Censored Label;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum; *HashMarks;&lt;BR /&gt;/* xaxistable atrisk / x=atrisk class=stratum colorgroup=stratum valueattrs=(weight=bold); *At risk Table;*/&lt;BR /&gt;keylegend 'c' / location=inside position=bottomright;&lt;BR /&gt;/* keylegend 's' / location=inside position=bottomleft across=1;*/&lt;BR /&gt;yaxis TICKSTYLE=OUTSIDE min=0 max=1;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Mar 2025 21:43:33 GMT</pubDate>
    <dc:creator>michelconn</dc:creator>
    <dc:date>2025-03-07T21:43:33Z</dc:date>
    <item>
      <title>Add Full Borders around graph with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-Full-Borders-around-graph-with-SGPLOT/m-p/961262#M25337</link>
      <description>&lt;P&gt;I want to add a full border around the the graph I'm making in sgplot. I have a line for the X and Y graph but can't find a any solution to add a line for the top and right side the like the example below that has a full box around the graph. The code below is what I'm using to create the graphs. Thanks!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ch2f1.gif" style="width: 475px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105275i15201E7E5C4E5C1E/image-size/large?v=v2&amp;amp;px=999" role="button" title="ch2f1.gif" alt="ch2f1.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;%macro kapsur(title,group,trantype,whereStatement);&lt;BR /&gt;title "&amp;amp;Title";&lt;BR /&gt;%ProvideSurvivalMacros;&lt;BR /&gt;%let TitleText0 = "&amp;amp;title";&lt;BR /&gt;%let TitleText1 = &amp;amp;titletext0 " for " STRATUMID; &lt;BR /&gt;%let TitleText2 = &amp;amp;titletext0;&lt;BR /&gt;%let InsetOpts = autoalign=(BottomRight) border=true BackgroundColor=GraphWalls:Color Opaque=true; &lt;BR /&gt;%let LegendOpts = title=GROUPNAME location=inside across=1 autoalign=(BottomLeft); &lt;BR /&gt;%let StepOpts = lineattrs=(thickness=2.5);&lt;BR /&gt;%CompileSurvivalTemplates; &lt;BR /&gt;ods output Survivalplot=SurvivalPlotData;&lt;BR /&gt;%if %isBlank(&amp;amp;whereStatement) and &amp;amp;group = AlloType %then %do;&lt;BR /&gt;proc lifetest data=bmt2 (where=(TransplantDate &amp;gt;= '01Jan2020'd and TransplantDate &amp;lt;= '31Dec2023'd and AllTransplantTypes = "&amp;amp;trantype")) &lt;BR /&gt;plots=survival(strata=panel) notable; &lt;BR /&gt;time SurvivalTime * nonsurvival(0); &lt;BR /&gt;strata &amp;amp;group; &lt;BR /&gt;&amp;amp;whereStatement;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;proc lifetest data=bmt2 (where=(TransplantDate &amp;gt;= '01Jan2020'd and TransplantDate &amp;lt;= '31Dec2023'd and AllTransplantTypes = "&amp;amp;trantype")) &lt;BR /&gt;plots=survival notable; &lt;BR /&gt;time SurvivalTime * nonsurvival(0); &lt;BR /&gt;strata &amp;amp;group; &lt;BR /&gt;&amp;amp;whereStatement;&lt;BR /&gt;run;&lt;BR /&gt;ods output close;&lt;BR /&gt;proc sort data=Survivalplotdata; by Stratum time; run;&lt;BR /&gt;data Survivalplotdata; set Survivalplotdata;; by stratum time notsorted; if last.stratum and last.time then label=stratum; run;&lt;BR /&gt;title "&amp;amp;Title";&lt;BR /&gt;%if %isBlank(&amp;amp;whereStatement) %then %do;&lt;BR /&gt;proc sgplot data=SurvivalPlotData noborder;&lt;BR /&gt;styleattrs axisextent=data;&lt;BR /&gt;/* dropline x=0 y=0.2 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.4 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.6 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.8 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=1.0 / dropto=y;*/&lt;BR /&gt;/* step x=time y=survival / group=stratum name='s' curvelabel curvelabelpos=auto curvelabelloc=inside; *Line Graph;*/&lt;BR /&gt;step x=time y=survival / group=stratum name='s' datalabel=label lineattrs=(thickness=2.5px); *Line Graph;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name='c'; *Censored Label;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum; *HashMarks;&lt;BR /&gt;/* xaxistable atrisk / x=atrisk class=stratum colorgroup=stratum valueattrs=(weight=bold); *At risk Table;*/&lt;BR /&gt;keylegend 'c' / location=inside position=bottomright;&lt;BR /&gt;keylegend 's' / location=inside position=bottomleft across=1;&lt;BR /&gt;yaxis TICKSTYLE=OUTSIDE min=0 max=1;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%else %do;&lt;BR /&gt;proc sgplot data=SurvivalPlotData noborder;&lt;BR /&gt;styleattrs axisextent=data;&lt;BR /&gt;/* dropline x=0 y=0.2 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.4 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.6 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=0.8 / dropto=y;*/&lt;BR /&gt;/* dropline x=0 y=1.0 / dropto=y;*/&lt;BR /&gt;step x=time y=survival / group=stratum name='s' lineattrs=(thickness=2.5px); *Line Graph;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) name='c'; *Censored Label;&lt;BR /&gt;scatter x=time y=censored / markerattrs=(symbol=plus) GROUP=stratum; *HashMarks;&lt;BR /&gt;/* xaxistable atrisk / x=atrisk class=stratum colorgroup=stratum valueattrs=(weight=bold); *At risk Table;*/&lt;BR /&gt;keylegend 'c' / location=inside position=bottomright;&lt;BR /&gt;/* keylegend 's' / location=inside position=bottomleft across=1;*/&lt;BR /&gt;yaxis TICKSTYLE=OUTSIDE min=0 max=1;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2025 21:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-Full-Borders-around-graph-with-SGPLOT/m-p/961262#M25337</guid>
      <dc:creator>michelconn</dc:creator>
      <dc:date>2025-03-07T21:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Add Full Borders around graph with SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-Full-Borders-around-graph-with-SGPLOT/m-p/961281#M25338</link>
      <description>&lt;P&gt;All you need to do is just changing the STYLE attached with your ods destination. For example, here my ods destination is HTML .&lt;/P&gt;
&lt;PRE&gt;ods html &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;style=sasweb&lt;/STRONG&gt;&lt;/FONT&gt;;
proc sgplot data=sashelp.class;
scatter x=weight y=height/group=sex datalabel=name;
run;&lt;/PRE&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="Ksharp_0-1741417803633.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/105280i049B1E2B7AEAC760/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1741417803633.png" alt="Ksharp_0-1741417803633.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 08 Mar 2025 07:10:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-Full-Borders-around-graph-with-SGPLOT/m-p/961281#M25338</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2025-03-08T07:10:10Z</dc:date>
    </item>
  </channel>
</rss>

