<?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: Add colours to graph // proc template + proc sgrender in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317606#M11105</link>
    <description>&lt;P&gt;If you want to use different marker attributes for markers in the scatter plot, add&lt;/P&gt;
&lt;P&gt;GROUP=sex&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to the SCATTERPLOT statement, where 'sex' is the name of a categorical variable (might be 'gender'...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The colors/symbols that appear are determined by the current style for the ODS destination. &amp;nbsp;If you don't like the style choice, you can use a different style or &lt;A href="http://support.sas.com/documentation/cdl/en/grstatgraph/69718/HTML/default/viewer.htm#n1oq0axfb1tc1yn10kgw6dyuitk2.htm" target="_self"&gt;define a discrete attribute map that overrides the style.&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Dec 2016 14:06:36 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-12-08T14:06:36Z</dc:date>
    <item>
      <title>Add colours to graph // proc template + proc sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317605#M11104</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to add colors to my regression plot. I plotted the regression of proportion of protein consumed in the morning with total amount of protein consumed. What I would like to do is give observations belonging to males and females different colours. Does someone have suggestions where I must add this information&amp;nbsp;in my syntax (see below).&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Many thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;template&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;define&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;statgraph&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; propprotbytotprot;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;begingraph&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;entrytitle&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"Proportion of protein ingested during morning by total protein ingested"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;layout&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;overlay&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; /&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;xaxisopts&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(griddisplay=on)&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;yaxisopts&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=(griddisplay=on);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;modelband&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"cli"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;name&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"mb1"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;legendlabel&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"95% Predict"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;datatransparency&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;0.5&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;modelband&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"clm"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;name&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"mb2"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;legendlabel&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"95% Mean"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;regressionplot&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;x&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=prop_sum_prot &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;y&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=prot_day / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;cli&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"cli"&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;clm&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"clm"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;scatterplot&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;x&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=prop_sum_prot &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;y&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=prot_day;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;discretelegend&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"mb1"&lt;/FONT&gt; &lt;FONT color="#800080" face="Courier New" size="2"&gt;"mb2"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;border&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=true &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;across&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;valign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=bottom &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;halign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=right &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;location&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=inside;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;entry&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;halign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=left &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;" Nobs="&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; eval(strip(put(n(prot_day),&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;12.0&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;))) / &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;valign&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=top;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endlayout&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endgraph&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;sgrender&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=final.hour &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;template&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;=propprotbytotprot ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; prop_sum_prot=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Proportion of protein ingested during morning hours (g)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;label&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; prot_day=&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"Total protein (g)"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 13:58:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317605#M11104</guid>
      <dc:creator>teuni</dc:creator>
      <dc:date>2016-12-08T13:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add colours to graph // proc template + proc sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317606#M11105</link>
      <description>&lt;P&gt;If you want to use different marker attributes for markers in the scatter plot, add&lt;/P&gt;
&lt;P&gt;GROUP=sex&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to the SCATTERPLOT statement, where 'sex' is the name of a categorical variable (might be 'gender'...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The colors/symbols that appear are determined by the current style for the ODS destination. &amp;nbsp;If you don't like the style choice, you can use a different style or &lt;A href="http://support.sas.com/documentation/cdl/en/grstatgraph/69718/HTML/default/viewer.htm#n1oq0axfb1tc1yn10kgw6dyuitk2.htm" target="_self"&gt;define a discrete attribute map that overrides the style.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 14:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317606#M11105</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-12-08T14:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Add colours to graph // proc template + proc sgrender</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317623#M11106</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your fast response. I tried this before, but instead of adding group=sex behind the scatterplot statement, I added it behind the regression statement. This did not work out well (obviously!).&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2016 15:41:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Add-colours-to-graph-proc-template-proc-sgrender/m-p/317623#M11106</guid>
      <dc:creator>teuni</dc:creator>
      <dc:date>2016-12-08T15:41:35Z</dc:date>
    </item>
  </channel>
</rss>

