<?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: Locating titles inside of chart area in proc sgplot in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230056#M16730</link>
    <description>&lt;P&gt;There is a much easier way! &amp;nbsp;Use the GTITLE option on the ODS statement. &amp;nbsp;If allowing SAS Enterprise Guide to generate your ODS output (for example, SAS Report or HTML), it looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* for SAS Report */
ODS tagsets.sasreport13(ID=EGSR) gtitle;

/* for HTML */
ODS HTML(ID=EGHTML) gtitle;

proc sgplot data=tme_a_data;
	title "Cost distribution for TME category='A'";
	vbarparm category=sum_category response=sum_proportion;
	xaxis tickvalueformat=dollar7. label="Cost";
	yaxis tickvalueformat=percent5. grid label="Percentage" values=(0 to .30 by .05);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Oct 2015 11:48:49 GMT</pubDate>
    <dc:creator>ChrisHemedinger</dc:creator>
    <dc:date>2015-10-15T11:48:49Z</dc:date>
    <item>
      <title>Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229762#M16716</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When creating charts in proc sgplot&amp;nbsp;(for example&amp;nbsp;see histogram code below) the title is always positioned&amp;nbsp;outside of&amp;nbsp;the chart area, so that when copying and pasting the chart into an email the title and chart are two separate items.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=tme_a_data;
	title "Cost distribution for TME category='A'";
	vbarparm category=sum_category response=sum_proportion;
	xaxis tickvalueformat=dollar7. label="Cost";
	yaxis tickvalueformat=percent5. grid label="Percentage" values=(0 to .30 by .05);
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to locate the title *inside* of the chart area "box", just above the plot (but not inside the axes)? I'd like title and chart to be a single picture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2015 18:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229762#M16716</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2015-10-13T18:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229829#M16720</link>
      <description>&lt;P&gt;The inset statement will work here, please try the below code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data=tme_a_data;
    vbarparm category=sum_category response=sum_proportion;
    xaxis tickvalueformat=dollar7. label="Cost";
    yaxis tickvalueformat=percent5. grid label="Percentage" values=(0 to .30 by .05);
inset (' '=  "Cost distribution for TME category='A'") / position=top;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2015 03:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229829#M16720</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-10-14T03:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229887#M16721</link>
      <description>&lt;P&gt;Thank you Jagadishkatam - I tried the inset statements but they always place the title inside of the axis area.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to put the title in the area between the axis area and the boundary of the entire chart area (the same area that the axis labels inhabit).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This may not be possible in SAS EG. The only other option which may work is to use the keylegend statement to position a title at the top&amp;nbsp;outside of&amp;nbsp;the axis area.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2015 13:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229887#M16721</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2015-10-14T13:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229965#M16727</link>
      <description>&lt;P&gt;Try sganno, that is what I use get get the title on the graph. &amp;nbsp;May have to adjust x1 y1.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Data anno;&lt;BR /&gt; function="text"; &lt;BR /&gt; x1space= 'graphpercent';&lt;BR /&gt; y1space= 'graphpercent';&lt;BR /&gt; width=400;&lt;BR /&gt; textweight='bold';&lt;BR /&gt; textsize=20;&lt;BR /&gt; anchor='centerleft';&lt;BR /&gt; y1=95;&lt;BR /&gt; x1=50;&lt;BR /&gt; label="Cost distribution for TME category='A'";&lt;BR /&gt; output;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;proc sgplot data=tme_a_data&lt;BR /&gt; sganno=anno pad=(top=10%);&lt;BR /&gt; vbarparm category=sum_category response=sum_proportion;&lt;BR /&gt; xaxis tickvalueformat=dollar7. label="Cost";&lt;BR /&gt; yaxis tickvalueformat=percent5. grid label="Percentage" values=(0 to .30 by .05);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Oct 2015 19:56:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229965#M16727</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2015-10-14T19:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229997#M16728</link>
      <description>&lt;P&gt;Thanks Bryan, that did the trick.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I imagine SAS will&amp;nbsp;update proc sgplot at some point to make title placement much simpler - the sganno fix works but doesn't it seem like a lot of code to stick a title above a chart?!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 02:40:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/229997#M16728</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2015-10-15T02:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230055#M16729</link>
      <description>&lt;P&gt;Glad I could help and I agree that it is a lot of code just to add a title in the chart.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 11:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230055#M16729</guid>
      <dc:creator>Bryan</dc:creator>
      <dc:date>2015-10-15T11:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230056#M16730</link>
      <description>&lt;P&gt;There is a much easier way! &amp;nbsp;Use the GTITLE option on the ODS statement. &amp;nbsp;If allowing SAS Enterprise Guide to generate your ODS output (for example, SAS Report or HTML), it looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* for SAS Report */
ODS tagsets.sasreport13(ID=EGSR) gtitle;

/* for HTML */
ODS HTML(ID=EGHTML) gtitle;

proc sgplot data=tme_a_data;
	title "Cost distribution for TME category='A'";
	vbarparm category=sum_category response=sum_proportion;
	xaxis tickvalueformat=dollar7. label="Cost";
	yaxis tickvalueformat=percent5. grid label="Percentage" values=(0 to .30 by .05);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Oct 2015 11:48:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230056#M16730</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2015-10-15T11:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230096#M16732</link>
      <description>&lt;P&gt;Thanks Chris - I tried running your suggested code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/* for HTML */
ODS HTML(ID=EGHTML) gtitle;

proc sgplot data=Prop_A_&amp;amp;bin_a;
	title "Cost distribution for TME category='A'";
	format sum_category dollar10.;
	vbarparm category=sum_category response=sum_proportion;
	xaxis tickvalueformat=dollar7. label="Cost";
	yaxis tickvalueformat=percent5. grid label="Percentage" values=(0 to .30 by .05);
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which runs successfully, but now the title is completely missing from the graph. Do I need to add anything to the ODS statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2015 14:38:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/230096#M16732</guid>
      <dc:creator>RobF</dc:creator>
      <dc:date>2015-10-15T14:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/250161#M17680</link>
      <description>&lt;P&gt;Hi. &amp;nbsp;I encountered your problem when googling for help with titles while using the SG plotting procedures. &amp;nbsp;I found this&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p0ugm0gm0wjbegn15tlz9voutu10.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/graphref/67881/HTML/default/viewer.htm#p0ugm0gm0wjbegn15tlz9voutu10.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;very helpful. &amp;nbsp;I think for your problem if you turn on the USEGOPT using the little bit of code below and then use Chris's solution as well it should work. &amp;nbsp;At least it worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS USEGOPT ;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Feb 2016 19:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/250161#M17680</guid>
      <dc:creator>LauraRK</dc:creator>
      <dc:date>2016-02-15T19:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: Locating titles inside of chart area in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/356868#M23480</link>
      <description>&lt;P&gt;Hi Chris,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just saying thank you for providing this option:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* for SAS Report */&lt;BR /&gt;ODS tagsets.sasreport13(ID=EGSR) gtitle;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was trying to add the title on to my SGPLOTs that were created in Enterprise Guide for the last hour. And this solved the problem. This also made the plots be in the same font as the plots I previoulsy created when using SAS 9.4. Fantastic option!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kriss Harris&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 13:12:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Locating-titles-inside-of-chart-area-in-proc-sgplot/m-p/356868#M23480</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2017-05-08T13:12:34Z</dc:date>
    </item>
  </channel>
</rss>

