<?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: problems with combining highlow and scatter in PROC SGPLOT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533550#M146296</link>
    <description>&lt;P&gt;Well, for the keylegend, if you name each plot, then only name the one you want in the keylegend it should work:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=ES(where=(RandomisedTo ne '')) noborder;
 refline 0 / axis=x;
 highlow y=label low=ES_lower high=ES_upper / group=RandomisedTo type=bar groupdisplay=cluster
 barwidth=0.6 clusterwidth=0.2 name="mybar";
 scatter x=ES y=label / markerattrs=(symbol=CircleFilled color=black size=5) group=RandomisedTo groupdisplay=cluster 
 legendlabel=' ' name='myscatter';
 yaxis display=(noline) label='Variable';
 keylegend "mybar" / noborder title='group';
 xaxis values=(-0.5 to 1.5 by 0.25) label='Effect size';
run;&lt;/PRE&gt;
&lt;P&gt;For the offset, could you make Y a numeric value, and apply a format with the label.&amp;nbsp; So the Y axis is 1-3, and apply the format to get the text, that should line them up.&amp;nbsp; Can't see another reason why they are offset off the top of my head.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2019 10:22:29 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2019-02-07T10:22:29Z</dc:date>
    <item>
      <title>problems with combining highlow and scatter in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533544#M146295</link>
      <description>&lt;P&gt;I am trying to make a bar chart to compare treatment effects in two groups. Data&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data ES;
input label $ RandomisedTo $ ES ES_lower ES_upper
Chest Intervention 0.27078 0.11417 0.42739
Chest Control -0.03958 -0.14217 0.06302
Lat Intervention 0.07824 -0.07517 0.23165
Lat Control -0.13788 -0.27184 -0.00392
VO2 Intervention 0.04811 -0.09418 0.19039
VO2 Control -0.07190 -0.20947 0.06568
;&lt;BR /&gt;run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my code is this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc sgplot data=ES(where=(RandomisedTo ne '')) noborder;
 refline 0 / axis=x;
 highlow y=label low=ES_lower high=ES_upper / group=RandomisedTo type=bar groupdisplay=cluster
 barwidth=0.6 clusterwidth=0.2;
 scatter x=ES y=label / markerattrs=(symbol=CircleFilled color=black size=5) group=RandomisedTo groupdisplay=cluster 
 legendlabel=' ';
 yaxis display=(noline) label='Variable';
 keylegend / noborder title='group';
 xaxis values=(-0.5 to 1.5 by 0.25) label='Effect size';
run;&lt;/PRE&gt;&lt;P&gt;and what i get is&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="plot.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/26938iE055EC4496B870F8/image-size/large?v=v2&amp;amp;px=999" role="button" title="plot.png" alt="plot.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two questions: (i) can I remove the unneccesary legend information about the black dots?, (ii) can I place the black dots inside the bars?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 09:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533544#M146295</guid>
      <dc:creator>KACH</dc:creator>
      <dc:date>2019-02-07T09:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: problems with combining highlow and scatter in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533550#M146296</link>
      <description>&lt;P&gt;Well, for the keylegend, if you name each plot, then only name the one you want in the keylegend it should work:&lt;/P&gt;
&lt;PRE&gt;proc sgplot data=ES(where=(RandomisedTo ne '')) noborder;
 refline 0 / axis=x;
 highlow y=label low=ES_lower high=ES_upper / group=RandomisedTo type=bar groupdisplay=cluster
 barwidth=0.6 clusterwidth=0.2 name="mybar";
 scatter x=ES y=label / markerattrs=(symbol=CircleFilled color=black size=5) group=RandomisedTo groupdisplay=cluster 
 legendlabel=' ' name='myscatter';
 yaxis display=(noline) label='Variable';
 keylegend "mybar" / noborder title='group';
 xaxis values=(-0.5 to 1.5 by 0.25) label='Effect size';
run;&lt;/PRE&gt;
&lt;P&gt;For the offset, could you make Y a numeric value, and apply a format with the label.&amp;nbsp; So the Y axis is 1-3, and apply the format to get the text, that should line them up.&amp;nbsp; Can't see another reason why they are offset off the top of my head.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 10:22:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533550#M146296</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-07T10:22:29Z</dc:date>
    </item>
    <item>
      <title>Re: problems with combining highlow and scatter in PROC SGPLOT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533552#M146297</link>
      <description>Thank you very much.</description>
      <pubDate>Thu, 07 Feb 2019 10:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/problems-with-combining-highlow-and-scatter-in-PROC-SGPLOT/m-p/533552#M146297</guid>
      <dc:creator>KACH</dc:creator>
      <dc:date>2019-02-07T10:28:07Z</dc:date>
    </item>
  </channel>
</rss>

