<?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 How do I assign requested colors in proc sgplot in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875419#M345882</link>
    <description>&lt;P&gt;Good day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to color the graphs drawn according to the customer requirements. The customer only need yellow, green, red and orange for each point in the data set.&lt;/P&gt;
&lt;P&gt;The program below only provides colors set by SAS. Can you help modify the program to assist the customer or is there any other way I could follow to assist the customer?&lt;/P&gt;
&lt;DIV&gt;%let date1=%sysfunc(today(),date9.);&lt;/DIV&gt;
&lt;DIV&gt;%Let reports = &amp;lt;library&amp;gt;;&lt;/DIV&gt;
&lt;DIV&gt;ods _all_ close;&lt;/DIV&gt;
&lt;DIV&gt;ODS excel FILE = "&amp;amp;reports\Metsi_Charts &amp;amp;date1..xlsx";&lt;/DIV&gt;
&lt;DIV&gt;OPTIONS PAGESIZE=MAX ORIENTATION=LANDSCAPE;&lt;/DIV&gt;
&lt;DIV&gt;ods graphics on / width=27.94cm height=15.24cm noscale;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods excel options(autofilter="1-6" sheet_name = "Determinand " embedded_titles='yes');&lt;/DIV&gt;
&lt;DIV&gt;proc sgplot data=datasets.Metsi2 ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; vline dates / response=value group=point groupdisplay=cluster ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;yaxis values=(0 to 2.4 by 0.2) label='Determinand' grid LABELATTRS=(weight=bold family=Helvetica size=7 )&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; VALUEATTRS=(family=Helvetica size=7 style=normal weight=normal ) ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;refline 0.1 / axis=y label=('0.1 mg/L') lineattrs=(color=red pattern=dash) labelattrs=(size=7) labelloc=inside;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; xaxis interval=day VALUESROTATE=VERTICALlabel='Sampled dates' LABELATTRS=(weight=bold size=7) valuesrotate=vertical &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;VALUEATTRS=(family=arial size=10 style=normal weight=normal ) type=time;&lt;/DIV&gt;
&lt;DIV&gt;title1 j=c "Metsi Determinand trend" bold;&lt;/DIV&gt;
&lt;DIV&gt;title;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 10:41:14 GMT</pubDate>
    <dc:creator>mmohotsi</dc:creator>
    <dc:date>2023-05-12T10:41:14Z</dc:date>
    <item>
      <title>How do I assign requested colors in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875419#M345882</link>
      <description>&lt;P&gt;Good day,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to color the graphs drawn according to the customer requirements. The customer only need yellow, green, red and orange for each point in the data set.&lt;/P&gt;
&lt;P&gt;The program below only provides colors set by SAS. Can you help modify the program to assist the customer or is there any other way I could follow to assist the customer?&lt;/P&gt;
&lt;DIV&gt;%let date1=%sysfunc(today(),date9.);&lt;/DIV&gt;
&lt;DIV&gt;%Let reports = &amp;lt;library&amp;gt;;&lt;/DIV&gt;
&lt;DIV&gt;ods _all_ close;&lt;/DIV&gt;
&lt;DIV&gt;ODS excel FILE = "&amp;amp;reports\Metsi_Charts &amp;amp;date1..xlsx";&lt;/DIV&gt;
&lt;DIV&gt;OPTIONS PAGESIZE=MAX ORIENTATION=LANDSCAPE;&lt;/DIV&gt;
&lt;DIV&gt;ods graphics on / width=27.94cm height=15.24cm noscale;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;ods excel options(autofilter="1-6" sheet_name = "Determinand " embedded_titles='yes');&lt;/DIV&gt;
&lt;DIV&gt;proc sgplot data=datasets.Metsi2 ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; vline dates / response=value group=point groupdisplay=cluster ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;yaxis values=(0 to 2.4 by 0.2) label='Determinand' grid LABELATTRS=(weight=bold family=Helvetica size=7 )&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp; VALUEATTRS=(family=Helvetica size=7 style=normal weight=normal ) ;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;refline 0.1 / axis=y label=('0.1 mg/L') lineattrs=(color=red pattern=dash) labelattrs=(size=7) labelloc=inside;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt; xaxis interval=day VALUESROTATE=VERTICALlabel='Sampled dates' LABELATTRS=(weight=bold size=7) valuesrotate=vertical &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;VALUEATTRS=(family=arial size=10 style=normal weight=normal ) type=time;&lt;/DIV&gt;
&lt;DIV&gt;title1 j=c "Metsi Determinand trend" bold;&lt;/DIV&gt;
&lt;DIV&gt;title;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 10:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875419#M345882</guid>
      <dc:creator>mmohotsi</dc:creator>
      <dc:date>2023-05-12T10:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign requested colors in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875426#M345887</link>
      <description>&lt;P&gt;Are you talking about using these colors in VLINE or somewhere else? Explain further. Please be specific.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 11:37:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875426#M345887</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-12T11:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign requested colors in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875456#M345899</link>
      <description>&lt;P&gt;Use attribute maps:&lt;/P&gt;
&lt;P&gt;here is the doc. with examples:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatgraph/n06cil5e9uw87mn1n7pzfefidh04.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatgraph/n06cil5e9uw87mn1n7pzfefidh04.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;here is a tutorial by&amp;nbsp;&lt;SPAN&gt;Joshua Horstman:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=Wm8VkqDjBps" target="_blank"&gt;https://www.youtube.com/watch?v=Wm8VkqDjBps&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Bart&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 13:16:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875456#M345899</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-12T13:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign requested colors in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875461#M345903</link>
      <description>Yes. I think the vline step could be the appropriate step to include these colors for each point. Thanks</description>
      <pubDate>Fri, 12 May 2023 13:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875461#M345903</guid>
      <dc:creator>mmohotsi</dc:creator>
      <dc:date>2023-05-12T13:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign requested colors in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875468#M345906</link>
      <description>&lt;P&gt;So, explain further. Do you want specific colors for specific VLINEs? I don't understand how the colors are used.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 13:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875468#M345906</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-05-12T13:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign requested colors in proc sgplot</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875470#M345908</link>
      <description>Good day&lt;BR /&gt;&lt;BR /&gt;Each vline corresponding to a point should have its own color. When I run this SAS code it gives each vline a color that I did not select. So I want to assign each vline a specific color of my choice.&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2023 13:58:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-do-I-assign-requested-colors-in-proc-sgplot/m-p/875470#M345908</guid>
      <dc:creator>mmohotsi</dc:creator>
      <dc:date>2023-05-12T13:58:09Z</dc:date>
    </item>
  </channel>
</rss>

