<?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: proc sgplot in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771188#M22046</link>
    <description>&lt;P&gt;What happens if you run the following code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My bars are grey but they're outlined in the colours identified in the data contrast list.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Version 1 (Results in Demo (4))&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='/home/fkhurshed/Demo1/demo.pdf' style=HTMLBlue color=full;

proc sort data=sashelp.cars out=cars;
by origin;
run;


proc sgplot data=cars;
 by origin;
 styleattrs
  datacontrastcolors=(red green blue);
 vbar make / response=cylinders stat=freq group=type groupdisplay=cluster ;
  xaxis display=(nolabel noline noticks);
 *yaxis display=(nolabel) values=(0 to 100 by 10) ;
  run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Version 2 (results in Demo (5))&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='/home/fkhurshed/Demo1/demo.pdf' /*style=HTMLBlue*/ color=full;

proc sort data=sashelp.cars out=cars;
by origin;
run;


proc sgplot data=cars;
 by origin;
* styleattrs
  datacontrastcolors=(red green blue);
 vbar make / response=cylinders stat=freq group=type groupdisplay=cluster ;
  xaxis display=(nolabel noline noticks);
 *yaxis display=(nolabel) values=(0 to 100 by 10) ;
  run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results are attached&amp;nbsp; - do they match what you're getting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Sep 2021 17:34:03 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-09-29T17:34:03Z</dc:date>
    <item>
      <title>proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771167#M22030</link>
      <description>&lt;P&gt;I get nice colored graphs in the Results Viewer but my outputted pdf file is black and white. (this is an update from last week's post)&lt;/P&gt;
&lt;P&gt;code:&lt;/P&gt;
&lt;P&gt;ods pdf file="Desktop\plots of sdoc_sc_top10.pdf";&lt;BR /&gt;PROC sort data=dst10_math;&lt;BR /&gt;by demoid;&lt;BR /&gt;run;&lt;BR /&gt;proc sgplot data=dst10_math;&lt;BR /&gt;by demoid;&lt;BR /&gt;styleattrs&lt;BR /&gt;datacontrastcolors=(red green blue);&lt;BR /&gt;vbar testgrade / response=mathpct34 group=level groupdisplay=cluster datalabel=mathpct34;&lt;BR /&gt;xaxis display=(nolabel noline noticks);&lt;BR /&gt;yaxis display=(nolabel) values=(0 to 100 by 10) ;&lt;BR /&gt;run;&lt;BR /&gt;ods pdf close;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 15:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771167#M22030</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T15:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771169#M22031</link>
      <description>Is there a specific reason this is in SAS VA and not Graphical Programming?</description>
      <pubDate>Wed, 29 Sep 2021 16:24:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771169#M22031</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T16:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771170#M22032</link>
      <description>&lt;P&gt;Use the COLOR= option in the&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmmvacdc/9.4/odsug/n0mc4eolqoned0n16oy88mpj0e4g.htm#p0dcupsnhrfe62n1b3uo7x5pxsoc" target="_self"&gt;ODS PDF&lt;/A&gt; statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 16:24:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771170#M22032</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-29T16:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771171#M22033</link>
      <description>ods pdf file="Desktop\plots of sdoc_sc_top10.pdf" style=HTMLBlue;</description>
      <pubDate>Wed, 29 Sep 2021 16:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771171#M22033</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T16:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771172#M22034</link>
      <description>I don't have a good answer for that.</description>
      <pubDate>Wed, 29 Sep 2021 16:29:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771172#M22034</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T16:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771173#M22035</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;ods pdf file="Desktop\plots of sdoc_sc_top10.pdf" style=HTMLBlue;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't see how this relates to the rest of the thread. Please explain why you showed us this code.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 16:31:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771173#M22035</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-29T16:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771174#M22036</link>
      <description>No style is specified in the PDF statement, styles help control the theme and appearance of the graph. &lt;BR /&gt;Adding a style, specifically the default should help with ensuring the presentations match between the ODS PDF and ODS HTML results. &lt;BR /&gt;&lt;BR /&gt;FYI - I explained this in the previous post so didn't bother in this one again.</description>
      <pubDate>Wed, 29 Sep 2021 16:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771174#M22036</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T16:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771177#M22037</link>
      <description>&lt;P&gt;I updated my code with a style=&amp;nbsp; and a color= option but with no change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file="Desktop\plots of sdoc_sc_top10.pdf" style=HTMLBlue color=full;
PROC sort data=dst10_math;
by demoid;
run;
proc sgplot data=dst10_math;
by demoid;
styleattrs
datacontrastcolors=(red green blue);
vbar testgrade / response=mathpct34 group=level groupdisplay=cluster datalabel=mathpct34;
xaxis display=(nolabel noline noticks);
yaxis display=(nolabel) values=(0 to 100 by 10) ;
run;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 16:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771177#M22037</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771178#M22038</link>
      <description>&lt;P&gt;Since I don't have your data set, I tried this with a different data set, and it works exactly as I expected it to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file="temp.pdf" color=full;
proc sgplot data=sashelp.class;
scatter x=height y=weight/markerattrs=(color=red);
run;
ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When you tried it, were there errors in the log?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 16:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771178#M22038</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-29T16:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771179#M22039</link>
      <description>That path doesn't look valid to me....is there a note in the log that the file is created successfully or did you truncate it for the forum?</description>
      <pubDate>Wed, 29 Sep 2021 16:59:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771179#M22039</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T16:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771180#M22040</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13712"&gt;@GreggB&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I don't have a good answer for that.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I asked about VA instead of graphical programming in case you are trying to do this in Visual Analytics or something and that would then be outside of what I'm familiar with entirely and there could be default options affecting your output...if it's not and just SAS Studio via Code, this question probably belongs in the graphical forum.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771180#M22040</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T17:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771182#M22041</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;518  ods pdf file="Desktop\plots of sdoc_sc_top10.pdf" style=HTMLBlue color=full;
NOTE: Writing ODS PDF output to DISK destination
      "C:\Users\gbibb\Desktop\plots of sdoc_sc_top10.pdf", printer "PDF".
519  PROC sort data=dst10_math;
520  by demoid;
521  run;

NOTE: Input data set is already sorted, no sorting done.
NOTE: PROCEDURE SORT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


522  proc sgplot data=dst10_math;
523  by demoid;
524  styleattrs
525  datacontrastcolors=(red green blue);
526  vbar testgrade / response=mathpct34 group=level groupdisplay=cluster datalabel=mathpct34;
527  xaxis display=(nolabel noline noticks);
528  yaxis display=(nolabel) values=(0 to 100 by 10) ;
529  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           2.92 seconds
      cpu time            1.45 seconds

NOTE: There were 299 observations read from the data set WORK.DST10_MATH.

530  ods pdf close;
NOTE: ODS PDF printed 17 pages to C:\Users\gbibb\Desktop\plots of sdoc_sc_top10.pdf.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771182#M22041</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T17:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771183#M22042</link>
      <description>please ignore. I meant to paste the log.</description>
      <pubDate>Wed, 29 Sep 2021 17:13:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771183#M22042</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T17:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771184#M22043</link>
      <description>Should I take this post down?</description>
      <pubDate>Wed, 29 Sep 2021 17:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771184#M22043</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T17:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771185#M22044</link>
      <description>&lt;P&gt;I don't think DATACONTRASTCOLORS works on VBAR plots. Try DATACOLORS=&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771185#M22044</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-29T17:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771187#M22045</link>
      <description>Nope, I've already moved it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:25:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771187#M22045</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T17:25:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771188#M22046</link>
      <description>&lt;P&gt;What happens if you run the following code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My bars are grey but they're outlined in the colours identified in the data contrast list.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Version 1 (Results in Demo (4))&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='/home/fkhurshed/Demo1/demo.pdf' style=HTMLBlue color=full;

proc sort data=sashelp.cars out=cars;
by origin;
run;


proc sgplot data=cars;
 by origin;
 styleattrs
  datacontrastcolors=(red green blue);
 vbar make / response=cylinders stat=freq group=type groupdisplay=cluster ;
  xaxis display=(nolabel noline noticks);
 *yaxis display=(nolabel) values=(0 to 100 by 10) ;
  run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Version 2 (results in Demo (5))&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods pdf file='/home/fkhurshed/Demo1/demo.pdf' /*style=HTMLBlue*/ color=full;

proc sort data=sashelp.cars out=cars;
by origin;
run;


proc sgplot data=cars;
 by origin;
* styleattrs
  datacontrastcolors=(red green blue);
 vbar make / response=cylinders stat=freq group=type groupdisplay=cluster ;
  xaxis display=(nolabel noline noticks);
 *yaxis display=(nolabel) values=(0 to 100 by 10) ;
  run;

ods pdf close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Results are attached&amp;nbsp; - do they match what you're getting?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 17:34:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771188#M22046</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-09-29T17:34:03Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771231#M22047</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;pointed out earlier, use DATACOLORS instead of DATACONTRASTCOLORS. DATACOLORS are for filled areas. DATACONTRASTCOLORS are for lines and markers. DATACONTRASTCOLORS would affect only the outlines of the bars.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure of the environment of the environment you're running. Is this in Display Manager, SAS Studio, or Enterprise Guide? If it is the last two, you have to ne very careful in how you use ODS destination statements. Let us know which is your environment.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 20:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771231#M22047</guid>
      <dc:creator>DanH_sas</dc:creator>
      <dc:date>2021-09-29T20:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771249#M22048</link>
      <description>&lt;P&gt;I just ran your code. a red scatterplot in&amp;nbsp; results viewer and black/white in the pdf file&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;536  ods pdf file="temp.pdf" color=full;
NOTE: Writing ODS PDF output to DISK destination "C:\Users\gbibb\temp.pdf", printer "PDF".
537  proc sgplot data=sashelp.class;
538  scatter x=height y=weight/markerattrs=(color=red);
539  run;

NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.37 seconds
      cpu time            0.18 seconds

NOTE: There were 19 observations read from the data set SASHELP.CLASS.

540  ods pdf close;
NOTE: ODS PDF printed 1 page to C:\Users\gbibb\temp.pdf.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 21:23:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771249#M22048</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T21:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771250#M22049</link>
      <description>&lt;P&gt;I'm running&amp;nbsp; 9.4 on a Windows laptop&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: This session is executing on the X64_10PRO  platform.



NOTE: Updated analytical products:

      SAS/STAT 14.3

NOTE: Additional host information:

 X64_10PRO WIN 10.0.18362  Workstation

NOTE: SAS initialization used:
      real time           1.38 seconds
      cpu time            0.99 seconds
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Sep 2021 21:28:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot/m-p/771250#M22049</guid>
      <dc:creator>GreggB</dc:creator>
      <dc:date>2021-09-29T21:28:12Z</dc:date>
    </item>
  </channel>
</rss>

