<?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: KM plot with a nested plot as if it were an INSET. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396345#M13572</link>
    <description>&lt;P&gt;Great example, Dan! Here is a simple example I worked up that illustrates the principles involved. &lt;BR /&gt;Very cool technique! I have never done this before. (edited since part of my code was with the text).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;ods graphics on / reset=all imagename="Inset" height=120px width=160px border=off;&lt;BR /&gt;
proc sgplot data=sashelp.class;
   hbar sex / barwidth=0.5;
   yaxis display=(nolabel);
   xaxis display=(nolabel);
run;

data anno;
   retain function "image" width 30 x1 1 y1 99 anchor "topleft"
          drawspace "wallpercent" image 'Inset.png';
run;

ods graphics on / reset=all imagename="Embedding";
proc sgplot data=sashelp.class sganno=anno noautolegend;
   styleattrs datacolors=(blue red) datasymbols=(circlefilled);
   scatter y=weight x=height / group=sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 15 Sep 2017 14:49:47 GMT</pubDate>
    <dc:creator>WarrenKuhfeld</dc:creator>
    <dc:date>2017-09-15T14:49:47Z</dc:date>
    <item>
      <title>KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396108#M13563</link>
      <description>&lt;P&gt;This format can be seen in the New England Journal of Medicine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can I make this with ODS graphics, GTL?&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="nejmoa1612917_f2.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15184i602610480150C36B/image-size/large?v=v2&amp;amp;px=999" role="button" title="nejmoa1612917_f2.jpg" alt="nejmoa1612917_f2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 01:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396108#M13563</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-09-15T01:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396132#M13568</link>
      <description>&lt;P&gt;I would imagine you could make a graph, store it as an image, then make the outer graph and bring in the image for the inner graph through SG Annotation. &amp;nbsp;That's all that pops into my mind this close to bed time.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 02:46:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396132#M13568</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-09-15T02:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396146#M13570</link>
      <description>&lt;P&gt;I actually demonstrate this annotation technique in the following paper, on pages 8-10:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0ahUKEwj0tNuDqKbWAhUMPCYKHTH3BtkQFggmMAA&amp;amp;url=https%3A%2F%2Fwww.pharmasug.org%2Fproceedings%2F2016%2FDG%2FPharmaSUG-2016-DG01.pdf&amp;amp;usg=AFQjCNFY_1zL-JvstpE9z_Pnsp1ITZ8x9A" target="_blank"&gt;Now You Can Annotate Your GTL Graphs! - PharmaSUG&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 04:08:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396146#M13570</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2017-09-15T04:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396345#M13572</link>
      <description>&lt;P&gt;Great example, Dan! Here is a simple example I worked up that illustrates the principles involved. &lt;BR /&gt;Very cool technique! I have never done this before. (edited since part of my code was with the text).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;ods graphics on / reset=all imagename="Inset" height=120px width=160px border=off;&lt;BR /&gt;
proc sgplot data=sashelp.class;
   hbar sex / barwidth=0.5;
   yaxis display=(nolabel);
   xaxis display=(nolabel);
run;

data anno;
   retain function "image" width 30 x1 1 y1 99 anchor "topleft"
          drawspace "wallpercent" image 'Inset.png';
run;

ods graphics on / reset=all imagename="Embedding";
proc sgplot data=sashelp.class sganno=anno noautolegend;
   styleattrs datacolors=(blue red) datasymbols=(circlefilled);
   scatter y=weight x=height / group=sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Sep 2017 14:49:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396345#M13572</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-09-15T14:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396348#M13573</link>
      <description>&lt;P&gt;This would work better if you provide a size for the inset image, and make sure it is placed in the right location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods html close;&lt;BR /&gt;ods listing gpath='c:\';&lt;BR /&gt;ods graphics / reset width=2in height=1.5in imagename='Inset';&lt;BR /&gt;proc sgplot data=sashelp.class;&lt;BR /&gt; hbar sex / barwidth=0.5;&lt;BR /&gt; yaxis display=(nolabel);&lt;BR /&gt; xaxis display=(nolabel);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data anno;&lt;BR /&gt; retain function "image" width 30 x1 1 y1 99 anchor "topleft"&lt;BR /&gt; drawspace "wallpercent" image 'c:\Inset.png';&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;ods graphics on / reset=all imagename="Embedding";&lt;BR /&gt;proc sgplot data=sashelp.class sganno=anno noautolegend;&lt;BR /&gt; styleattrs datacolors=(blue red) datasymbols=(circlefilled);&lt;BR /&gt; scatter y=weight x=height / group=sex;&lt;BR /&gt;run;&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="Embedding.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/15213iA5BF09E31F8FF5FB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Embedding.png" alt="Embedding.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 14:35:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396348#M13573</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-09-15T14:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396365#M13574</link>
      <description>&lt;P&gt;Sorry. &amp;nbsp;Copy and paste error on my part. &amp;nbsp;Here it is including my initial statement, which does specify a size.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on / reset=all imagename="Inset" height=120px width=160px border=off;

proc sgplot data=sashelp.class;
   hbar sex / barwidth=0.5;
   yaxis display=(nolabel);
   xaxis display=(nolabel);
run;

data anno;
   retain function "image" width 30 x1 1 y1 99 anchor "topleft"
          drawspace "wallpercent" image 'Inset.png';
run;

ods graphics on / reset=all imagename="Embedding";
proc sgplot data=sashelp.class sganno=anno noautolegend;
   styleattrs datacolors=(blue red) datasymbols=(circlefilled);
   scatter y=weight x=height / group=sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 Sep 2017 14:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396365#M13574</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-09-15T14:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396387#M13578</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15130"&gt;@DanH_sas&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I actually demonstrate this annotation technique in the following paper, on pages 8-10:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0ahUKEwj0tNuDqKbWAhUMPCYKHTH3BtkQFggmMAA&amp;amp;url=https%3A%2F%2Fwww.pharmasug.org%2Fproceedings%2F2016%2FDG%2FPharmaSUG-2016-DG01.pdf&amp;amp;usg=AFQjCNFY_1zL-JvstpE9z_Pnsp1ITZ8x9A" target="_blank"&gt;Now You Can Annotate Your GTL Graphs! - PharmaSUG&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Thanks so much Dan, I figured it would be annotate but I would never have known the proper options/statements without seeing your example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 17:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396387#M13578</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-09-15T17:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: KM plot with a nested plot as if it were an INSET.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396390#M13579</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16777"&gt;@WarrenKuhfeld&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Great example, Dan! Here is a simple example I worked up that illustrates the principles involved. &lt;BR /&gt;Very cool technique! I have never done this before. (edited since part of my code was with the text).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;ods graphics on / reset=all imagename="Inset" height=120px width=160px border=off;&lt;BR /&gt;
proc sgplot data=sashelp.class;
   hbar sex / barwidth=0.5;
   yaxis display=(nolabel);
   xaxis display=(nolabel);
run;

data anno;
   retain function "image" width 30 x1 1 y1 99 anchor "topleft"
          drawspace "wallpercent" image 'Inset.png';
run;

ods graphics on / reset=all imagename="Embedding";
proc sgplot data=sashelp.class sganno=anno noautolegend;
   styleattrs datacolors=(blue red) datasymbols=(circlefilled);
   scatter y=weight x=height / group=sex;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hi Warren,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the helpful example.&amp;nbsp; I think this technique is going to be very useful to me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Sep 2017 15:23:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/KM-plot-with-a-nested-plot-as-if-it-were-an-INSET/m-p/396390#M13579</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-09-15T15:23:07Z</dc:date>
    </item>
  </channel>
</rss>

