<?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 SGANNO  Target Lines on a hbar chart in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125398#M4854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having trouble getting&amp;nbsp; vertical lines as targets in the proper place for a hbar chart using sgplot procedure&lt;/P&gt;&lt;P&gt;data looks something like this&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="167.39999997615814" style="border: 1px solid #000000; width: 285.39999997615814px; height: 123.39999997615814px;" width="283.39999997615814"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Facility&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;response&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;target&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;26&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;36&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Graph should look like this or so (with the red lines being the targets)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2940_Capture.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I've seen it done with the regular annotate facility, but haven't been able to get too far with sganno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Jan 2013 03:23:40 GMT</pubDate>
    <dc:creator>BigD</dc:creator>
    <dc:date>2013-01-15T03:23:40Z</dc:date>
    <item>
      <title>SGANNO  Target Lines on a hbar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125398#M4854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having trouble getting&amp;nbsp; vertical lines as targets in the proper place for a hbar chart using sgplot procedure&lt;/P&gt;&lt;P&gt;data looks something like this&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="167.39999997615814" style="border: 1px solid #000000; width: 285.39999997615814px; height: 123.39999997615814px;" width="283.39999997615814"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Facility&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;response&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;target&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;26&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;36&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;18&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;11&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;h4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;112&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Graph should look like this or so (with the red lines being the targets)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2940_Capture.JPG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I've seen it done with the regular annotate facility, but haven't been able to get too far with sganno&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 03:23:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125398#M4854</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2013-01-15T03:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: SGANNO  Target Lines on a hbar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125399#M4855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While you can certainly do this with SGAnno, you don't need annotate&amp;nbsp; You can use HBarParm and HiglLow combination to get what you need.&amp;nbsp; You can reduce the bar width if you need.&amp;nbsp; Here is the graph and the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="2944" alt="TargetSG.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2944_TargetSG.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data target;&lt;BR /&gt;&amp;nbsp; input Facility $ Response Target;&lt;BR /&gt;&amp;nbsp; datalines;&lt;BR /&gt;H1&amp;nbsp; 26&amp;nbsp; 36&lt;BR /&gt;H2&amp;nbsp;&amp;nbsp; 8&amp;nbsp; 18&lt;BR /&gt;H3&amp;nbsp; 11&amp;nbsp; 25&lt;BR /&gt;H4 112 140&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;title 'Response and Target by Facility';&lt;BR /&gt;proc sgplot data=target;&lt;BR /&gt;&amp;nbsp; hbarparm category=facility response=response / fillattrs=graphdata1 name='a';&lt;BR /&gt;&amp;nbsp; highlow&amp;nbsp; y=facility low=target high=target / lineattrs=graphdata2(thickness=2 pattern=solid) &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name='t' legendlabel='Target';&lt;BR /&gt;&amp;nbsp; highlow&amp;nbsp; y=facility low=target high=target / type=bar lineattrs=graphdata2(thickness=2 pattern=solid);&lt;BR /&gt;&amp;nbsp; xaxis display=(nolabel) offsetmin=0;&lt;BR /&gt;&amp;nbsp; yaxis display=(nolabel) reverse;&lt;BR /&gt;&amp;nbsp; discretelegend 'a' 't';&lt;BR /&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Two HighLow plots are used.&amp;nbsp; One with default Type=Line for the legend.&amp;nbsp; The other with Type=bar for the actual target in the graph.&amp;nbsp; You could use a scatter plot to draw the target for a different look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TargetSG2.png" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/2947_TargetSG2.png" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;title 'Response and Target by Facility';&lt;/P&gt;&lt;P&gt;proc sgplot data=target;&lt;/P&gt;&lt;P&gt;&amp;nbsp; hbarparm category=facility response=response / fillattrs=graphdata1 name='a';&lt;/P&gt;&lt;P&gt;&amp;nbsp; scatter&amp;nbsp; y=facility x=target / markerattrs=graphdata2(symbol=triangledownfilled size=11)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; name='t' legendlabel='Target' discreteoffset=0.3;&lt;/P&gt;&lt;P&gt;&amp;nbsp; xaxis display=(nolabel) offsetmin=0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; yaxis display=(nolabel) reverse;&lt;/P&gt;&lt;P&gt;&amp;nbsp; discretelegend 'a' 't';&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 05:58:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125399#M4855</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2013-01-15T05:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: SGANNO  Target Lines on a hbar chart</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125400#M4856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much. Much easier and serves my purpose well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still would like to see the sganno solution as it would come in handy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 11:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SGANNO-Target-Lines-on-a-hbar-chart/m-p/125400#M4856</guid>
      <dc:creator>BigD</dc:creator>
      <dc:date>2013-01-15T11:59:50Z</dc:date>
    </item>
  </channel>
</rss>

