<?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: In SAS9.3, How Can I Change Graphic Colors &amp;amp; Symbols? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471022#M16260</link>
    <description>&lt;P&gt;Hi, RW9:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, my mistake of copying.&lt;/P&gt;&lt;P&gt;Of course, I used STYLE=mystyle in my previous code, but I didn't get my wanted.&lt;/P&gt;&lt;P&gt;Can you get it by using this code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SGRNDER Procedure, I'll try it, but I want to know how I can get it using the code I gave.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jun 2018 10:21:51 GMT</pubDate>
    <dc:creator>KentaMURANAKA</dc:creator>
    <dc:date>2018-06-18T10:21:51Z</dc:date>
    <item>
      <title>In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471003#M16256</link>
      <description>&lt;P&gt;Hi, All:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have data like the following code, which have Estimate Value with lower &amp;amp; upper CL per Treatment per TimePoint.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
    input trtn time lower estimate upper;
    datalines;
    1 1 0.1 0.15 0.3
    1 2 6.5 7 8.5
    1 3 8 9.2 10
    1 4 7.5 8.5 9
    1 5 6.5 7 7.4
    1 6 3.5 4.2 4.5
    1 7 2.1 2.3 2.7
    1 8 1.9 2 2.1
    1 9 1.5 1.7 1.9
    1 10 1.4 1.5 1.8
    2 1 1.1 1.15 1.3
    2 2 7.5 8 9.5
    2 3 9 10.2 11
    2 4 8.5 9.5 10
    2 5 7.5 8 8.4
    2 6 4.5 5.2 5.5
    2 7 3.1 3.3 3.7
    2 8 2.9 3 3.1
    2 9 2.5 2.7 2.9
    2 10 2.4 2.5 2.8
    3 1 2.1 2.15 2.3
    3 2 8.5 9 10.5
    3 3 10 11.2 12
    3 4 9.5 10.5 11
    3 5 8.5 9 10.4
    3 6 5.5 6.2 6.5
    3 7 4.1 4.3 4.7
    3 8 3.9 4 4.1
    3 9 3.5 3.7 3.9
    3 10 3.4 3.5 3.8
    ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Using this data, I want to make time-series graph, and I got my objective using SAS9.4.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing gpath="YourFilesAddress";
ods graphics on / reset
                  imagename="YourFileName" imagefmt=emf border=off
                  width=6in height=6in
                  attrpriority=none;
proc sgplot data=test noautolegend;
    styleattrs datalinepatterns=(solid)
               datacontrastcolors=("lime" "purple" "red")
               datasymbols=("circlefilled" "trianglefilled" "squarefilled");
    scatter x=time y=estimate / group=trtn yerrorlower=lower yerrorupper=upper;
    series x=time y=estimate / name="series" group=trtn lineattrs=(pattern=1) markers markerattrs=(size=0.1in);
    keylegend "series" / noborder location=outside position=bottomleft across=3 down=1; 
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20180618_1.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21239i00BE2222C20F44EC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="20180618_1.JPG" alt="20180618_1.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want graph with 3 combinations (Lime&amp;amp;circlefilled, purple&amp;amp;trianglefilled, Red&amp;amp;squarefilled), and I want to use SAS9.3, instead of SAS9.4.&lt;/P&gt;&lt;P&gt;In SAS9.3, I probably can't use ATTRSPRIORITY= &amp;amp; STYLEATTRS.&lt;/P&gt;&lt;P&gt;So I wrote the code below, and using SAS9.3 &amp;amp; %MODSTYLE, I got this result.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%modstyle(parent=listing, name=mystyle,
          colors=lime purple red, markers=circlefilled trianglefilled squarefilled, linestyles=1);
ods listing gpath="YourFilesAddress" style=mystyle;
ods graphics on / reset
                  imagename="YourFileName" imagefmt=emf border=off
                  width=6in height=6in
                  /*attrpriority=none*/;
proc sgplot data=test noautolegend;
/*    styleattrs datalinepatterns=(solid)*/
/*               datacontrastcolors=("lime" "purple" "red")*/
/*               datasymbols=("circlefilled" "trianglefilled" "squarefilled");*/
    scatter x=time y=estimate / group=trtn yerrorlower=lower yerrorupper=upper;
    series x=time y=estimate / name="series" group=trtn lineattrs=(pattern=1) markers markerattrs=(size=0.1in);
    keylegend "series" / noborder location=outside position=bottomleft across=3 down=1; 
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20180618_2.JPG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21240iA23C4606159D2774/image-size/medium?v=v2&amp;amp;px=400" role="button" title="20180618_2.JPG" alt="20180618_2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This result is not my wanted (colors are good, but all symbols are circles).&lt;/P&gt;&lt;P&gt;I want to accomplish 3CombinationGraph. Please help me.&lt;/P&gt;&lt;P&gt;Thank you for advance.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 08:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471003#M16256</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-06-18T08:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471007#M16257</link>
      <description>&lt;P&gt;If you have SAS 9.4 and code which works correctly, why would you want to use 9.3 and re-factor the code?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes you can't use styleattrs in 9.3, it was introduced in 9.4.&lt;/P&gt;
&lt;P&gt;What would be simplest is just to modify the style used and fix in your colors/symbols:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2014/05/30/assigning-graph-style-attributes-easily/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2014/05/30/assigning-graph-style-attributes-easily/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also set symbols on the markerattrs statement:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#p0vfbphgtg4qkun1ui6q7kllqsa5.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/grstatproc/65235/HTML/default/viewer.htm#p0vfbphgtg4qkun1ui6q7kllqsa5.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 09:07:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471007#M16257</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-18T09:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471010#M16258</link>
      <description>&lt;P&gt;Hi, RW9:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks to information you gave me, I got closer to my objective, I feel.&lt;/P&gt;&lt;P&gt;But my code below, in which TEMPLATE Procedure is used, gave me same one as my previous second photo.&lt;/P&gt;&lt;P&gt;I can't find why only colors are changed &amp;amp; symbols are all circlefilled.&lt;/P&gt;&lt;P&gt;Please give me advice. Thank you.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
  define style mystyle;
  parent=styles.htmlblue;
    class graphdata1 /
          contrastcolor=lime linestyle=1 markersymbol='circlefilled';
    class graphdata2 /
          contrastcolor=purple linestyle=1 markersymbol='trianglefilled';
    class graphdata3 /
          contrastcolor=red linestyle=1 markersymbol='squarefilled';
  end;
run;
ods listing gpath="YourFilesAddress";
ods graphics on / reset
                  imagename="YourFileName" imagefmt=emf border=off
                  width=6in height=6in
                  ;
proc sgplot data=test noautolegend;
    scatter x=time y=estimate / group=trtn yerrorlower=lower yerrorupper=upper;
    series x=time y=estimate / name="series" group=trtn lineattrs=(pattern=1) markers markerattrs=(size=0.1in);
    keylegend "series" / noborder location=outside position=bottomleft across=3 down=1; 
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Reason I have to use SAS9.3 depends on my condtion. I'm sorry,but I want to accomplish my objective using SAS9.3.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 09:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471010#M16258</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-06-18T09:34:53Z</dc:date>
    </item>
    <item>
      <title>Re: In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471017#M16259</link>
      <description>&lt;P&gt;But your not actually using the style anywhere in your code?&amp;nbsp; E.g.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods rtf file="..." style=mystyle;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try GTL:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/grstatgraph/65377/HTML/default/viewer.htm#p1li59qpc1kvgen1r9k8bkoxw7wo.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/grstatgraph/65377/HTML/default/viewer.htm#p1li59qpc1kvgen1r9k8bkoxw7wo.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Afraid I don't even have 9.3 anymore so can't test anything.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 10:12:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471017#M16259</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-06-18T10:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471022#M16260</link>
      <description>&lt;P&gt;Hi, RW9:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, my mistake of copying.&lt;/P&gt;&lt;P&gt;Of course, I used STYLE=mystyle in my previous code, but I didn't get my wanted.&lt;/P&gt;&lt;P&gt;Can you get it by using this code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SGRNDER Procedure, I'll try it, but I want to know how I can get it using the code I gave.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 10:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471022#M16260</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-06-18T10:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471024#M16261</link>
      <description>&lt;P&gt;Hi, RW9:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry, I understand you don't have SAS9.3.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 10:26:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471024#M16261</guid>
      <dc:creator>KentaMURANAKA</dc:creator>
      <dc:date>2018-06-18T10:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: In SAS9.3, How Can I Change Graphic Colors &amp; Symbols?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471158#M16262</link>
      <description>&lt;P&gt;With the scatter and series statements investigate the MARKERATTRS= option to set marker symbol and colors.&lt;/P&gt;
&lt;P&gt;Or look into DATTRMAP for a discrete attribute map for values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jun 2018 16:44:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/In-SAS9-3-How-Can-I-Change-Graphic-Colors-amp-Symbols/m-p/471158#M16262</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-18T16:44:53Z</dc:date>
    </item>
  </channel>
</rss>

