<?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 a Table to a SAS Graph in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46160#M1553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a simple way to add a frequency table to a SAS graph without creating an annotate dataset?&amp;nbsp; (I have not had time to figure out annotations yet, althought I know they can come in quite handy.)&amp;nbsp; I am making a &amp;amp;quot;waterfall&amp;amp;quot; chart using the INTERPOL=NEEDLE option in the SYMBOL statement.&amp;nbsp; I want to overlay on the plot a frequency table that shows the counts of patients that are above, below, or between a given range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen plots where the data table is below the graph (I think it was summary data below a bunch of side-by-sde boxplots), but I don't want that.&amp;nbsp; I want an actual table on the graph itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Nov 2011 15:39:08 GMT</pubDate>
    <dc:creator>djbateman</dc:creator>
    <dc:date>2011-11-11T15:39:08Z</dc:date>
    <item>
      <title>Add a Table to a SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46160#M1553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a simple way to add a frequency table to a SAS graph without creating an annotate dataset?&amp;nbsp; (I have not had time to figure out annotations yet, althought I know they can come in quite handy.)&amp;nbsp; I am making a &amp;amp;quot;waterfall&amp;amp;quot; chart using the INTERPOL=NEEDLE option in the SYMBOL statement.&amp;nbsp; I want to overlay on the plot a frequency table that shows the counts of patients that are above, below, or between a given range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have seen plots where the data table is below the graph (I think it was summary data below a bunch of side-by-sde boxplots), but I don't want that.&amp;nbsp; I want an actual table on the graph itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2011 15:39:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46160#M1553</guid>
      <dc:creator>djbateman</dc:creator>
      <dc:date>2011-11-11T15:39:08Z</dc:date>
    </item>
    <item>
      <title>Add a Table to a SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46161#M1554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think there's any way to do this automatically - you'll have to use one of the 'tricks' to add extra text.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would probably use annotate, and programmatically position the text using a data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are several other tricks you can use to get text on a graph, such as using 'note' statements, or writing the text on a gslide, and then 'greplay' that gslide onto the chart.&amp;nbsp; But nothing easy/automated that I know of.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2011 15:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46161#M1554</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2011-11-11T15:46:26Z</dc:date>
    </item>
    <item>
      <title>Add a Table to a SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46162#M1555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Use PROC SGPLOT and use the statement&lt;/P&gt;&lt;P&gt;scatter x=x y=y / MARKERCHAR=cell x2axis&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;where x and y are the coordinates in the table and cell is contents of the cell. See p. 11 of Sanjay's paper &lt;A href="http://www.pharmasug.org/proceedings/2011/SAS/PharmaSUG-2011-SAS-AD01.pdf"&gt;http://www.pharmasug.org/proceedings/2011/SAS/PharmaSUG-2011-SAS-AD01.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2011 15:52:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46162#M1555</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2011-11-11T15:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Table to a SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46163#M1556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ... one idea without annotation is to use a legend to put extra information on SAS/GRAPH output .&amp;nbsp; I used SQL to create a macro variable with&lt;/P&gt;&lt;P&gt;text for the legend (it might have been just as easy to type out the entries !!!).&amp;nbsp; Anyways, the following inserts something that looks&lt;/P&gt;&lt;P&gt;a bit like a table in the upper left portion of the plot.&amp;nbsp; Every J=L produces a new line in the legend.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc sql noprint;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;create view counts as&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;select distinct put(date,monname. -l) as month, put(sum(air),comma.) as freq&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;from sashelp.air&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;group month&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;order month(date);&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;select cat('j=l "',strip(month),' : ',strip(freq), '"') into :tmp separated by ' '&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;from counts;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;goptions reset=all ftext='calibri' htext=2 gunit=pct&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;device=png xpixels=1024 ypixels=768 gsfname=gout;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;legend1&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;position=(top inside left)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;label=(position=top j=l "TRAVEL BY MONTH (1000s)" j=l ' ' &amp;amp;tmp)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;shape=symbol(.00001,.0001) value=none&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;symbol f='wingdings' v='6c'x c=blue h=2 i=smp66 l=2 w=2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;axis1 label=(a=90 'TRAVEL (1000s)');&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;axis2 label=('MONTH AND YEAR') offset=(2,2)pct;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;title1 ls=2;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;filename gout 'z:\plot_table.png';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;proc gplot data=sashelp.air;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;plot air*date/ legend=legend1 vaxis=axis1 haxis=axis2 noframe;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;format date monyy.;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;quit;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11402i1D29DD49DDADF696/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="plot_table.png" title="plot_table.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Nov 2011 20:12:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46163#M1556</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2011-11-11T20:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: Add a Table to a SAS Graph</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46164#M1557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using SAS 9.2, you can use SG Procedures or GTL to add statistics tables to your graphs without resorting to annotation.&amp;nbsp; Rick pointed to a way using SG Procedures.&amp;nbsp; For more flexibility, you can use GTL.&amp;nbsp; Please see my recent &lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2011/11/12/graphs-with-axis-aligned-statistics-tables/"&gt;blog post &lt;/A&gt;on this subject.&amp;nbsp; Axis aligned statistics tables can be added along the horizontal or vertical, discrete or interval axis.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Nov 2011 02:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-a-Table-to-a-SAS-Graph/m-p/46164#M1557</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2011-11-12T02:51:28Z</dc:date>
    </item>
  </channel>
</rss>

