<?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: Adding a box around a part of a graphic title in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/579145#M18640</link>
    <description>&lt;P&gt;This should do it. Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Aug 2019 14:28:00 GMT</pubDate>
    <dc:creator>Ubai</dc:creator>
    <dc:date>2019-08-05T14:28:00Z</dc:date>
    <item>
      <title>Adding a box around a part of a graphic title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/578903#M18629</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was reading a paper on cancer on JAMA and the data was analyzed using SAS. The graphics were qualitatively high and I would like to learn a couple of things.&lt;/P&gt;&lt;P&gt;For example in this kaplan-meier curve, a box is added around the first letter of the title. I suppose this graph was constructed as a lattice in SGPlot or maybe Proc LifeTest. How is it possible to add this box? I usually use the newsurv macro for kaplan-meier curves. Is it possible to do it there too?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cdn.jamanetwork.com/ama/content_public/journal/oncology/0/coi190053f1.png?Expires=2147483647&amp;amp;Signature=ZTM~kXuSMDl5SjYrrc-3LgjCP3LVLr3ekGav6N7CNLMpLqohj~f3iTMdYmpIy94XsEphtMDucFhK39ADxlUAallpRzDRyyncdIyTl~lcVYFxsig6e7dtlEtdd2atWBa2FPAuBOEBqXGtJcUDc9gf42dX-upyJI8hDg7gK-fUPcEjpIKrRti~rZkUpK8CKDdqccFpj8YdgT8NPCeYIBO3JTXJufeKDk101SEzbaABvI4~BF46yqoUf2v8EhCQ3Mxu~oWgsaTHpRVIqRmZXzJFj-P2kN-yvmBusbGJHgvA7oRl9xIfndGnYqWK8DXbMyBwaapS9~YwsqRuwVDzODWpmA__&amp;amp;Key-Pair-Id=APKAIE5G5CRDK6RD3PGA" target="_self"&gt;The graph (click here).&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://jamanetwork.com/journals/jamaoncology/fullarticle/2738775?guestAccessKey=8de5ecff-5e84-447b-b646-c6315e433de0&amp;amp;utm_source=silverchair&amp;amp;utm_medium=email&amp;amp;utm_campaign=article_alert-jamaoncology&amp;amp;utm_term=mostread&amp;amp;utm_content=olf-widget_07262019" target="_self"&gt;The paper (click here).&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ubai&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2019 13:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/578903#M18629</guid>
      <dc:creator>Ubai</dc:creator>
      <dc:date>2019-08-03T13:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a box around a part of a graphic title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/578922#M18630</link>
      <description>&lt;P&gt;I think you'll need to use an annotation data set to put a box around just a part of a title.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / noborder;

proc sgplot data=sashelp.class;
  scatter y=weight x=height / group=sex;
  title j=l box=1 "A  Height and Weight for SASHELP.CLASS";
  footnote j=l 'This version uses TITLE statement with BOX option';
run;

title;

%sganno;

data anno;
  %sgtext(label=" A", 
          border="true",
          drawspace="layoutpercent",
          xc1="2",
          yc1="105",
          anchor="center",
          justify="center");
  %sgtext(label="  Height and weight for SASHELP.CLASS", 
          border="false",
          xc1="24",
          yc1="105",
          widthunit="percent",
          width=50,
          justify="left");
run;

* pad= option is adding space at the top of the graphic for 
* the title from the annotation data set ;

proc sgplot data=sashelp.class sganno=anno pad=(top=10pct);
  scatter y=weight x=height / group=sex;
  footnote j=l 'This version uses annotation data set for the title.';
run;  

ods graphics / reset=all;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The screen shot below shows the graphic when using an annotation data set for the title.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Use an annotation data set to put a box around part of a title in a graphic" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/31509i6B40BC3DF70621EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Use an annotation data set to put a box around part of a title in a graphic.jpg" alt="Use an annotation data set to put a box around part of a title in a graphic" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Use an annotation data set to put a box around part of a title in a graphic&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 03 Aug 2019 17:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/578922#M18630</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2019-08-03T17:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a box around a part of a graphic title</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/579145#M18640</link>
      <description>&lt;P&gt;This should do it. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Aug 2019 14:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Adding-a-box-around-a-part-of-a-graphic-title/m-p/579145#M18640</guid>
      <dc:creator>Ubai</dc:creator>
      <dc:date>2019-08-05T14:28:00Z</dc:date>
    </item>
  </channel>
</rss>

