<?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: Some problems when plotting scatterplot by using GTL in SAS Studio 3.8 in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631754#M19603</link>
    <description>&lt;P&gt;Thanks for your suggestion where I learned a lot.&amp;nbsp; I succeed changing marker colors by DATACONTRASTCOLORS and displaying scatters&amp;nbsp; by using a discrete xaxis(See figure 1 below). However,&amp;nbsp; it seemed that there was still a liitle difference, compared with the example plot in sas reference document (the figure on the right, also see&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p08qhdljvzthmnn1vkbule00ad6r.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1awnzwvhmriunn1f8qsouia7zu3b" target="_self"&gt;sas document URL here&lt;/A&gt;). Perhaps the example here uses a different type of layout? (lattice for example)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="figure1.png" style="width: 396px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36824iBACA8F1AA04D5578/image-dimensions/396x198?v=v2" width="396" height="198" role="button" title="figure1.png" alt="figure1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="figure2.png" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36826iCC268F03604EDF6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="figure2.png" alt="figure2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Mar 2020 00:43:56 GMT</pubDate>
    <dc:creator>myrenO3</dc:creator>
    <dc:date>2020-03-13T00:43:56Z</dc:date>
    <item>
      <title>Some problems when plotting scatterplot by using GTL in SAS Studio 3.8</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631577#M19595</link>
      <description>&lt;P&gt;Hey guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to draw plots by using GTL in sas. Recently I was trying to draw scatter plots but some problems occured when i was trying&amp;nbsp; a scatterplot within&amp;nbsp; "layout overlay" block. I used SASHELP.CLASSFIT as my training dataset where x=height and y=weight with group=sex. &lt;STRONG&gt;Also, i wanted to display the plot seperately by using &lt;FONT color="#FF0000"&gt;groupdisplay=cluster&lt;/FONT&gt; but I faied.&lt;/STRONG&gt; it seemed that the scatterplot was still displayed in a overlay mode. So I'm wondering why the groupdisplay option has no effect? (I run all sas codes in SAS studio 3.8 environment)&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;
ods graphics / reset width=900px height=450px;
ods html style=htmlblue path=odsout file="3-scatter.html";
proc template;
  define statgraph myscatter;
    begingraph /; 
      entrytitle "Height and Weight by Sex"; 
      layout overlay / ; 
        scatterplot x=height y=weight / 
           group=sex &lt;FONT color="#FF0000"&gt;groupdisplay=cluster&lt;/FONT&gt; name="scatter" markerattrs=(size=12 symbol=starfilled);
      endlayout;	
    endgraph;
  end;
run;

proc sgrender data=sashelp.classfit template=myscatter;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="微信截图_20200312223011.png" style="width: 438px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36798i2A8F7A50ED532670/image-dimensions/438x221?v=v2" width="438" height="221" role="button" title="微信截图_20200312223011.png" alt="微信截图_20200312223011.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;by the way, I was also wondering how to costomize markers with different&amp;nbsp; colors (i.e., green and ) between male(sex=M) and female(sex=F) but i don't know how.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any suggestions!&lt;/P&gt;&lt;P&gt;Myren&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 14:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631577#M19595</guid>
      <dc:creator>myrenO3</dc:creator>
      <dc:date>2020-03-12T14:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Some problems when plotting scatterplot by using GTL in SAS Studio 3.8</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631596#M19600</link>
      <description>&lt;P&gt;GroupDisplay=Cluster is effective when one of the axes is discrete.&amp;nbsp; You can make your XAXIS discrete to see the effect by setting TYPE=Discrete in the XaxisOpts bundle on the Layout Overlay statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the DATACOLORS option on the BEGINGRAPH statement to set group colors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=n0j696v6yqkb79n12zed3am3omcx.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=n0j696v6yqkb79n12zed3am3omcx.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=n0j696v6yqkb79n12zed3am3omcx.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=n0j696v6yqkb79n12zed3am3omcx.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631596#M19600</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2020-03-12T15:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Some problems when plotting scatterplot by using GTL in SAS Studio 3.8</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631613#M19602</link>
      <description>&lt;P&gt;For SCATTER marker colors, you need to use the DataContrastColors option.&lt;/P&gt;
&lt;P&gt;DataColors is used for "fill" colors.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 15:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631613#M19602</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2020-03-12T15:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Some problems when plotting scatterplot by using GTL in SAS Studio 3.8</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631754#M19603</link>
      <description>&lt;P&gt;Thanks for your suggestion where I learned a lot.&amp;nbsp; I succeed changing marker colors by DATACONTRASTCOLORS and displaying scatters&amp;nbsp; by using a discrete xaxis(See figure 1 below). However,&amp;nbsp; it seemed that there was still a liitle difference, compared with the example plot in sas reference document (the figure on the right, also see&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=grstatgraph&amp;amp;docsetTarget=p08qhdljvzthmnn1vkbule00ad6r.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en#p1awnzwvhmriunn1f8qsouia7zu3b" target="_self"&gt;sas document URL here&lt;/A&gt;). Perhaps the example here uses a different type of layout? (lattice for example)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="figure1.png" style="width: 396px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36824iBACA8F1AA04D5578/image-dimensions/396x198?v=v2" width="396" height="198" role="button" title="figure1.png" alt="figure1.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="figure2.png" style="width: 300px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36826iCC268F03604EDF6D/image-size/large?v=v2&amp;amp;px=999" role="button" title="figure2.png" alt="figure2.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 00:43:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631754#M19603</guid>
      <dc:creator>myrenO3</dc:creator>
      <dc:date>2020-03-13T00:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Some problems when plotting scatterplot by using GTL in SAS Studio 3.8</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631758#M19604</link>
      <description>&lt;P&gt;Previously your x variable was 'Height", with "Sex" as the group variable.&amp;nbsp; Now, your x variable is sex.&amp;nbsp; Change it back to height to get the different groups within each value of weight.&amp;nbsp; Make sure to set the axis TYPE=DISCRETE.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 00:57:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631758#M19604</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2020-03-13T00:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Some problems when plotting scatterplot by using GTL in SAS Studio 3.8</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631771#M19608</link>
      <description>&lt;P&gt;Thanks for your reminding. I tried but it seemed that no changes ocurred. here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*1-Basic scatter plot-*/
ods _all_ close;
ods graphics / reset width=900px height=450px;
ods html style=htmlblue path=odsout file="3-scatter.html";
proc template;
  define statgraph myscatter;
    begingraph / datacontrastcolors=(red green); 
      entrytitle "Simple Scatter plot"; 
      layout overlay / 
      	xaxisopts=(type=discrete); 
        scatterplot x=height y=weight / group=sex groupdisplay=cluster name="scatter" markerattrs=(size=12 symbol=starfilled);
        discretelegend "scatter";
      endlayout;	
    endgraph;
  end;
run;

proc sgrender data=sashelp.classfit template=myscatter;
run;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SGRender.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36829i18EE772DC895663F/image-size/large?v=v2&amp;amp;px=999" role="button" title="SGRender.png" alt="SGRender.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Mar 2020 02:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Some-problems-when-plotting-scatterplot-by-using-GTL-in-SAS/m-p/631771#M19608</guid>
      <dc:creator>myrenO3</dc:creator>
      <dc:date>2020-03-13T02:48:01Z</dc:date>
    </item>
  </channel>
</rss>

