<?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: X axis color different in SAS output and PNG output in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428372#M14784</link>
    <description>&lt;P&gt;Thanks Dan, I removed the&amp;nbsp;"goptions device=png gsfname=graphout;" but it is still did not work.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 14:19:50 GMT</pubDate>
    <dc:creator>hanyi0221</dc:creator>
    <dc:date>2018-01-17T14:19:50Z</dc:date>
    <item>
      <title>X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428358#M14776</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I'm having a problem that the X axis color is not as defined in PNG output. As you can see in the attachments,&amp;nbsp;&amp;nbsp;the X axis color is grey in the SAS output which is the color I want, but in the PNG output it is still black. Could someone help me with it? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;data anno;&lt;BR /&gt;drawspace = 'GraphPercent';&lt;BR /&gt;function = 'Rectangle';&lt;BR /&gt;cornerradius=0.1;&lt;BR /&gt;linestyleelement='GraphAxisLines';&lt;BR /&gt;TRANSPARENCY=0.5;&lt;BR /&gt;Border=NOborder;&lt;BR /&gt;retain x1 y1 50 height width 100 widthunit 'Percent';&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods graphics on/reset IMAGENAME ="&amp;amp;sheet.."&lt;BR /&gt;IMAGEFMT =PNG&lt;BR /&gt;width=8in height=2in;&lt;BR /&gt;goptions device=png gsfname=graphout;&lt;/P&gt;&lt;P&gt;PROC SGPLOT DATA = T1&amp;amp;sheet. sganno=anno dattrmap=attrmap noborder;&lt;BR /&gt;Scatter Y=NAME X = MY2R/markerAttrs=(size=6mM) group=MY2 attrid=MY2 datalabel=MY2R DATALABELATTRS=(size=8.5pt Family=ArialNarrow weight=bold COLOR=White) DATALABELPOS=CENTER transparency=0.1;&lt;BR /&gt;XAXIS DISPLAY=(NOTICKS) TICKVALUEFORMAT=data VALUEATTRS=(color=grey) label=' ';&lt;BR /&gt;YAXIS DISPLAY=(NOTICKS noline) LABEL = ' ' labelattrs=(color=White) valueattrs=(size=12pt Family=Arial color=black) GRID gridattrs=(color=WhiteSmoke) MINORGRIDATTRS=(color=green pattern=longdash thickness=2);&lt;BR /&gt;keylegend 'Percent'/noborder;&lt;BR /&gt;title "&amp;amp;sheet.";&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 13:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428358#M14776</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2018-01-17T13:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428365#M14779</link>
      <description>&lt;P&gt;Try removing the GOPTIONS statement. Normally, GOPTIONs should not be used with the ODS Graphics system. Let me know if that makes a difference.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:05:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428365#M14779</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-01-17T14:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428372#M14784</link>
      <description>&lt;P&gt;Thanks Dan, I removed the&amp;nbsp;"goptions device=png gsfname=graphout;" but it is still did not work.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428372#M14784</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2018-01-17T14:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428380#M14786</link>
      <description>&lt;P&gt;Do you want to control the color of xaxis line or the color of the xaxis thick mark values?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:30:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428380#M14786</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2018-01-17T14:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428384#M14787</link>
      <description>&lt;P&gt;Hi Bruno, I want to control both of them and both color should be grey.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:38:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428384#M14787</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2018-01-17T14:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428388#M14788</link>
      <description>&lt;P&gt;What ODS destinations do you have open? I cannot tell by your code.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428388#M14788</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-01-17T14:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428389#M14789</link>
      <description>&lt;P&gt;What ODS destinations do you have open? I cannot tell by your code.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:51:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428389#M14789</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2018-01-17T14:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428416#M14794</link>
      <description>&lt;P&gt;If you send output to a different ODS destination and do not specify the same style then you likely get different results as HTML, RTF and PDF destinations by default use different ODS STYLES.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Change the path information in the code below and examine the differences between the 4 output files:&lt;/P&gt;
&lt;PRE&gt;ods rtf file="c:\path\demo.rtf" ;
ods pdf file="c:\path\demo.pdf" ;

PROC SGPLOT DATA = T1&amp;amp;sheet. sganno=anno dattrmap=attrmap noborder;
Scatter Y=NAME X = MY2R/markerAttrs=(size=6mM) group=MY2 attrid=MY2 datalabel=MY2R DATALABELATTRS=(size=8.5pt Family=ArialNarrow weight=bold COLOR=White) DATALABELPOS=CENTER transparency=0.1;
XAXIS DISPLAY=(NOTICKS) TICKVALUEFORMAT=data VALUEATTRS=(color=grey) label=' ';
YAXIS DISPLAY=(NOTICKS noline) LABEL = ' ' labelattrs=(color=White) valueattrs=(size=12pt Family=Arial color=black) GRID gridattrs=(color=WhiteSmoke) MINORGRIDATTRS=(color=green pattern=longdash thickness=2);
keylegend 'Percent'/noborder;
title "&amp;amp;sheet.";
run;

ods pdf close;
ods rtf close;

ods rtf file="c:\path\demo2.rtf" style=meadow;
ods pdf file="c:\path\demo2.pdf"  style=meadow;

PROC SGPLOT DATA = T1&amp;amp;sheet. sganno=anno dattrmap=attrmap noborder;
Scatter Y=NAME X = MY2R/markerAttrs=(size=6mM) group=MY2 attrid=MY2 datalabel=MY2R DATALABELATTRS=(size=8.5pt Family=ArialNarrow weight=bold COLOR=White) DATALABELPOS=CENTER transparency=0.1;
XAXIS DISPLAY=(NOTICKS) TICKVALUEFORMAT=data VALUEATTRS=(color=grey) label=' ';
YAXIS DISPLAY=(NOTICKS noline) LABEL = ' ' labelattrs=(color=White) valueattrs=(size=12pt Family=Arial color=black) GRID gridattrs=(color=WhiteSmoke) MINORGRIDATTRS=(color=green pattern=longdash thickness=2);
keylegend 'Percent'/noborder;
title "&amp;amp;sheet.";
run;

ods pdf close;
ods rtf close;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428416#M14794</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-01-17T15:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428432#M14796</link>
      <description>&lt;P&gt;As far as I know the color of an axis line can only be changed using a style.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of creating your own style and change the color, I have used red for better visability.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* add my own itemsore in front of the ods path */
ods path
  (prepend) work.mytemplates (update)
;

/* show source of defualt style */
proc template;
  source styles.default;
run;

/* build my own style, only changing the color  */
proc template;
  define style styles.greyLine;
    parent=styles.htmlblue;

    class GraphAxisLines /
      contrastcolor = red
      color = red
    ;
    class GraphValueText /
      color = red
    ;
  end;
run;

ods html file="c:\temp\sample.html" gpath="c:\temp" style=styles.greyline;
proc sgplot data = sashelp.class tmplout="c:\temp\sgplot.sas" noborder;

  scatter x=age y=height;
  xaxis display=(noticks) tickvalueformat=data  label=' ';

run;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Maybe you can also use&amp;nbsp;the REFLINE statement to add additional lines, you can control the color of each reference line.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428432#M14796</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2018-01-17T15:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428441#M14799</link>
      <description>&lt;P&gt;Thanks Bruno, it works!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:49:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428441#M14799</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2018-01-17T15:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: X axis color different in SAS output and PNG output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428442#M14800</link>
      <description>&lt;P&gt;Hi Ballard,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help. The meadow style did not&amp;nbsp;make grey color but it did change the X axis color.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:51:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/X-axis-color-different-in-SAS-output-and-PNG-output/m-p/428442#M14800</guid>
      <dc:creator>hanyi0221</dc:creator>
      <dc:date>2018-01-17T15:51:49Z</dc:date>
    </item>
  </channel>
</rss>

