<?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: Now to create scatter plot like this? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341055#M11839</link>
    <description>&lt;P&gt;We could try the sgplot procedure as below,&amp;nbsp; I am assuming that the graph is overlapping of scatter plot on box plot with mean. If it is the case the below procedure should help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=have;&lt;/P&gt;
&lt;P&gt;scatter x=feed_type y=weight / &amp;nbsp;markerattrs = (size = 2 symbol = circlefilled); /*this will be the scatter plot*/&lt;/P&gt;
&lt;P&gt;vbox weight / category=feed_type; /*this will create the box plot with mean*/&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2017 03:41:06 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2017-03-15T03:41:06Z</dc:date>
    <item>
      <title>Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341044#M11837</link>
      <description>&lt;P&gt;HI, dose anyone has insight to create the following figure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7751iAA9218E41704904F/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="dotwithmedian_baser.png" title="dotwithmedian_baser.png" /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 02:50:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341044#M11837</guid>
      <dc:creator>JohnChen_TW</dc:creator>
      <dc:date>2017-03-15T02:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341055#M11839</link>
      <description>&lt;P&gt;We could try the sgplot procedure as below,&amp;nbsp; I am assuming that the graph is overlapping of scatter plot on box plot with mean. If it is the case the below procedure should help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sgplot data=have;&lt;/P&gt;
&lt;P&gt;scatter x=feed_type y=weight / &amp;nbsp;markerattrs = (size = 2 symbol = circlefilled); /*this will be the scatter plot*/&lt;/P&gt;
&lt;P&gt;vbox weight / category=feed_type; /*this will create the box plot with mean*/&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 03:41:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341055#M11839</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-03-15T03:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341058#M11840</link>
      <description>&lt;P&gt;Looks like variation on a box plot.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/graphicallyspeaking/2012/05/07/unbox-your-box-plots/" target="_blank"&gt;http://blogs.sas.com/content/graphicallyspeaking/2012/05/07/unbox-your-box-plots/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 03:54:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341058#M11840</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-15T03:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341059#M11841</link>
      <description>&lt;P&gt;Here is an approaching example:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table class as
select *, median(weight) as med
from sashelp.class
group by age;
quit;

proc sgplot data=class noautolegend;
vbox med / category=age nomean nomedian nocaps
    lineattrs=(color=red thickness=2);
scatter y=weight x=age / markerattrs=(symbol=circlefilled);
xaxis type=discrete;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7752iB9CA2932F549594E/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="SGPlot5.png" title="SGPlot5.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 03:54:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341059#M11841</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-15T03:54:45Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341061#M11842</link>
      <description>&lt;P&gt;Hi Jagadishkatam,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the overlapping scatter plot and box plot is not worked.&lt;BR /&gt;Please see the SAS log below.&lt;BR /&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7753i6949C56C1F889D04/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="未命名.png" title="未命名.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, I'm using SAS 9.3.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 04:06:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341061#M11842</guid>
      <dc:creator>JohnChen_TW</dc:creator>
      <dc:date>2017-03-15T04:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341067#M11843</link>
      <description>&lt;P&gt;I guess in 9.3 you could cheat this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table class as
select *, median(weight) as med
from sashelp.class
group by age;
quit;

proc sgplot data=class noautolegend;
scatter x=age y=med / yerrorlower=med yerrorupper=med 
    markerattrs=(size=0) errorbarattrs=(thickness=2 color=red);
scatter y=weight x=age / markerattrs=(symbol=circlefilled color=blue);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7754i673317A3CA1285B4/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="SGPlot8.png" title="SGPlot8.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 04:23:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341067#M11843</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-15T04:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341074#M11844</link>
      <description>Hi PG Stats,&lt;BR /&gt;&lt;BR /&gt;Thanks for your solution.&lt;BR /&gt;Another question, how to lengthen the length of 'mean'?</description>
      <pubDate>Wed, 15 Mar 2017 05:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341074#M11844</guid>
      <dc:creator>JohnChen_TW</dc:creator>
      <dc:date>2017-03-15T05:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341075#M11845</link>
      <description>&lt;P&gt;I don't know. Seems to be proportional to line thickness.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 05:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341075#M11845</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-15T05:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341076#M11846</link>
      <description>Okay. I will try.&lt;BR /&gt;According to your reply, SAS 9.3 cannot overlay vbox and scatter plot, right?</description>
      <pubDate>Wed, 15 Mar 2017 05:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341076#M11846</guid>
      <dc:creator>JohnChen_TW</dc:creator>
      <dc:date>2017-03-15T05:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341218#M11849</link>
      <description>&lt;P&gt;If you know the value for drawing the mean or median (the red line), and are using SAS 9.3, I suggest overlaying a Scatter and a HighLow (Type=Bar). &amp;nbsp;Make the high and low the same value to get a single line. &amp;nbsp;You can set the BarWidth to control the width of the line.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 14:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341218#M11849</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-03-15T14:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341256#M11850</link>
      <description>&lt;P&gt;OK, one more try, following &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;'s suggestion (tested with 9.4) :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table class as
select *, median(weight) as med
from sashelp.class
group by age;
quit;

proc sgplot data=class noautolegend;
highlow x=age high=med low=med / type=bar lineattrs=(thickness=2 color=red) barwidth=0.6;
scatter y=weight x=age / markerattrs=(symbol=circlefilled color=blue);
xaxis type=discrete;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/7766i26E9B5886315ED26/image-size/medium?v=1.0&amp;amp;px=-1" border="0" alt="SGPlot6.png" title="SGPlot6.png" /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 16:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341256#M11850</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-15T16:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Now to create scatter plot like this?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341405#M11851</link>
      <description>I'm creating the figure by your suggestion. Great thanks for everyone's suggestion!&lt;BR /&gt;Besides, the function "median" seems not okay in SAS 9.3. There will be a warning message "The MEDIAN function has been called with only one argument.".&lt;BR /&gt;However, 'mean' function can be worked in proc sql statement and that what I need!&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;JC</description>
      <pubDate>Thu, 16 Mar 2017 02:59:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Now-to-create-scatter-plot-like-this/m-p/341405#M11851</guid>
      <dc:creator>JohnChen_TW</dc:creator>
      <dc:date>2017-03-16T02:59:51Z</dc:date>
    </item>
  </channel>
</rss>

