<?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: How to change styles ( color/ pattern of lines/ symbols/ font/ fntsiz) in graphs using Proc Temp in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780697#M248777</link>
    <description>&lt;P&gt;First of all, there is not need to use the Graph Template Language (GTL) to create this graph. Proc SGPLOT will do this with less code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To control elements in your plots I recommend to have a look at these blogs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2017/09/15/proc-sgplot-theres-an-attrs-for-that/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2017/09/15/proc-sgplot-theres-an-attrs-for-that/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Nov 2021 10:54:29 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2021-11-17T10:54:29Z</dc:date>
    <item>
      <title>How to change styles ( color/ pattern of lines/ symbols/ font/ fntsiz) in graphs using Proc Template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780650#M248753</link>
      <description>&lt;P&gt;Hi I am newly learning into Proc Template&amp;nbsp; to create different graphs. I want to know how I can control the&amp;nbsp; graph styles such as line colors, line pattern, symbols,&amp;nbsp; fonts used in the graph. can you please guys suggest me what to do in the following code. I tried at SAS, but for me it looks too vast&amp;nbsp; and some times going over my head &lt;span class="lia-unicode-emoji" title=":sleepy_face:"&gt;😪&lt;/span&gt;.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ODS LISTING CLOSE;
data cars;
set sashelp.cars;
engine=enginesize;
run;
PROC MEANS DATA= cars;
 CLASS origin engine;
 VAR horsepower;
 OUTPUT OUT=summary (WHERE=(_type_ EQ 3)) N=n MEAN=mean STDDEV=stddev MIN=min
MAX=max;
RUN;
ODS LISTING;
DATA summary;
 SET summary;
 IF UPCASE(origin) EQ 'ASIA' THEN engine = engine-0.1;
 IF UPCASE(origin) EQ 'USA' THEN engine = engine+0.1;
RUN;


PROC TEMPLATE;
 DEFINE STATGRAPH errorbar;
 BeginGraph;
 EntryTitle "PhUSE 2010";
 EntryTitle "Example Error Bar (Mean " {UNICODE '00B1'X}
 " SD) Plot Using GTL";
 Layout OVERLAY /
 XAxisOpts=(LABEL="Engine Size")
 YAxisOpts=(LABEL="Mean Horsepower");
 ScatterPlot X=engine Y=mean /
 GROUP=origin NAME="scatter"
 YErrorLower=EVAL(mean-stddev);
/* YErrorUpper=EVAL(mean+stddev);*/
 SeriesPlot X=engine Y=mean / GROUP=origin;
 DiscreteLegend "scatter" / ACROSS=3 TITLE="Origin of Car";

 EndLayout;
 EndGraph;
 END;
RUN;


options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline 
noquotelenmax ;
ods escapechar = '^';
ods results on; 
ods listing close; 
ods rtf file = "\\xx\D\xx\Desktop\Graphs\sed-err-anno.rtf" style = table_rtf;* nogtitle nogfootnote;

PROC SGRENDER DATA=summary TEMPLATE=errorbar;
RUN;
ods rtf close;
ods listing close;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I am looking to change the color and pattern of the lines and symbols and the font in x axis y axis labels and legends in the following graph. I really appreciate your help and advise&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASuserlot_0-1637111046218.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65808i6A96DED8720A203D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASuserlot_0-1637111046218.png" alt="SASuserlot_0-1637111046218.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 01:05:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780650#M248753</guid>
      <dc:creator>SASuserlot</dc:creator>
      <dc:date>2021-11-17T01:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to change styles ( color/ pattern of lines/ symbols/ font/ fntsiz) in graphs using Proc Temp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780697#M248777</link>
      <description>&lt;P&gt;First of all, there is not need to use the Graph Template Language (GTL) to create this graph. Proc SGPLOT will do this with less code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To control elements in your plots I recommend to have a look at these blogs:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sgf/2017/09/15/proc-sgplot-theres-an-attrs-for-that/" target="_blank"&gt;https://blogs.sas.com/content/sgf/2017/09/15/proc-sgplot-theres-an-attrs-for-that/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 10:54:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780697#M248777</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2021-11-17T10:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change styles ( color/ pattern of lines/ symbols/ font/ fntsiz) in graphs using Proc Temp</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780706#M248783</link>
      <description>&lt;PRE&gt;data cars;
set sashelp.cars;
engine=enginesize;
run;
PROC MEANS DATA= cars;
 CLASS origin engine;
 VAR horsepower;
 OUTPUT OUT=summary (WHERE=(_type_ EQ 3)) N=n MEAN=mean STDDEV=stddev MIN=min
MAX=max;
RUN;

DATA summary;
 SET summary;
 IF UPCASE(origin) EQ 'ASIA' THEN engine = engine-0.1;
 IF UPCASE(origin) EQ 'USA' THEN engine = engine+0.1;
RUN;


PROC TEMPLATE;
 DEFINE STATGRAPH errorbar;



 BeginGraph / BORDER=False datacontrastcolor=(gold navy green) datasymbol=(plus circle star); /*&amp;lt;------*/



 EntryTitle "PhUSE 2010";
 EntryTitle "Example Error Bar (Mean " {UNICODE '00B1'X}
 " SD) Plot Using GTL";
 Layout OVERLAY /
 XAxisOpts=(LABEL="Engine Size")
 YAxisOpts=(LABEL="Mean Horsepower");


 ScatterPlot X=engine Y=mean /
 GROUP=origin NAME="scatter"
 YErrorLower=EVAL(mean-stddev);
/* YErrorUpper=EVAL(mean+stddev);*/
 SeriesPlot X=engine Y=mean / GROUP=origin;
 DiscreteLegend "scatter" / ACROSS=3 TITLE="Origin of Car";
 EndLayout;
 EndGraph;
 END;
RUN;



ods graphics /ATTRPRIORITY=none ;   /*&amp;lt;------*/


options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline 
noquotelenmax ;
ods escapechar = '^';
ods rtf file = "c:\temp\temp.rtf" style = rtf;* nogtitle nogfootnote;

PROC SGRENDER DATA=summary TEMPLATE=errorbar;
RUN;
ods rtf close;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Nov 2021 11:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-change-styles-color-pattern-of-lines-symbols-font-fntsiz/m-p/780706#M248783</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-11-17T11:42:00Z</dc:date>
    </item>
  </channel>
</rss>

