<?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: CDF plots (cumulative density) using proc univariate in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726510#M21151</link>
    <description>&lt;P&gt;You can do it by changing the ODS style, but many people find it easier to &lt;A href="https://blogs.sas.com/content/iml/2012/08/01/data-fro-ods-graphics.html" target="_self"&gt;use ODS OUTPUT to write the data underlying the graph to a SAS data set&lt;/A&gt;, and then use PROC SGPLOT to customize the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the pink/green and line styles, make sure you are using&amp;nbsp;AttrPriority=None on the ODS GRAPHICS statement. You can then &lt;A href="https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html" target="_self"&gt;use the STYLEATTRS statement to specify the line colors and patterns&lt;/A&gt;, as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;
set sashelp.cars;
where origin in ('USA' 'Asia');
run;

proc univariate data=A noprint ;
class origin;
var mpg_city;
cdfplot /overlay odstitle=none ;
ods output CDFPlot = OutCDF;
run;

ods graphics / AttrPriority=None;
title "My CDF Plot";
proc sgplot data=outCDF noautolegend;
   styleattrs DATACONTRASTCOLORS=(Pink DarkGreen) DATALINEPATTERNS=(solid dash);
   step x=ECDFX y=ECDFY / group=Class1; /* variable names created by PROC UNIVARIATE */
   xaxis grid;
   yaxis grid min=0 label="Cumulative Proportion";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 15 Mar 2021 19:16:36 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2021-03-15T19:16:36Z</dc:date>
    <item>
      <title>CDF plots (cumulative density) using proc univariate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726461#M21149</link>
      <description>&lt;P&gt;Hi, I using the following code to build the plot attached. I would need to change the attributes of the lines to pink solid line and green dashed line. At present it is showing blue and red solid lines be default. Anyone suggest a method to change the attributes?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;ods listing close;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;ods pdf file="&amp;amp;g_outfile..&amp;amp;g_fontsize" nobookmarkgen style=idsl dpi=600 ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;ods noproctitle ;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;title1 j=l height=10pt "Protocol: %upcase(&amp;amp;g_study_id)" j=r "Page 1 of 1";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;title2 j=l height=10pt "Population: &amp;amp;g_poplbl";&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;title3 j=center "Figure &amp;amp;g_dsplynum"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;title4 j=center "&amp;amp;g_title1 "; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;title5 %if &amp;amp;g_title2 = %then %do; color = white "." %end; %else %do; j=center "&amp;amp;g_title2." %end;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;*footnote1 j=left h=9pt "&amp;amp;g_foot1"; &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;Footnote1 j=left h=9pt j=left "&amp;amp;g_userid: &amp;amp;g_pgmpth &amp;amp;sysdate9 &amp;amp;systime";&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;proc univariate data=sf36_obs noprint ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;class trtppn ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;var chg;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;cdfplot /overlay odstitle=none ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;ods pdf close;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;ods listing;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Manj_0-1615827700891.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55969iA50FC4C5514D3F13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Manj_0-1615827700891.png" alt="Manj_0-1615827700891.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 17:02:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726461#M21149</guid>
      <dc:creator>Manj</dc:creator>
      <dc:date>2021-03-15T17:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: CDF plots (cumulative density) using proc univariate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726507#M21150</link>
      <description>&lt;P&gt;Is this for a class?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 19:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726507#M21150</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-15T19:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: CDF plots (cumulative density) using proc univariate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726510#M21151</link>
      <description>&lt;P&gt;You can do it by changing the ODS style, but many people find it easier to &lt;A href="https://blogs.sas.com/content/iml/2012/08/01/data-fro-ods-graphics.html" target="_self"&gt;use ODS OUTPUT to write the data underlying the graph to a SAS data set&lt;/A&gt;, and then use PROC SGPLOT to customize the graph.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get the pink/green and line styles, make sure you are using&amp;nbsp;AttrPriority=None on the ODS GRAPHICS statement. You can then &lt;A href="https://blogs.sas.com/content/iml/2018/06/13/attrpriority-cycleattrs-styleattrs-ods-graphics.html" target="_self"&gt;use the STYLEATTRS statement to specify the line colors and patterns&lt;/A&gt;, as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;
set sashelp.cars;
where origin in ('USA' 'Asia');
run;

proc univariate data=A noprint ;
class origin;
var mpg_city;
cdfplot /overlay odstitle=none ;
ods output CDFPlot = OutCDF;
run;

ods graphics / AttrPriority=None;
title "My CDF Plot";
proc sgplot data=outCDF noautolegend;
   styleattrs DATACONTRASTCOLORS=(Pink DarkGreen) DATALINEPATTERNS=(solid dash);
   step x=ECDFX y=ECDFY / group=Class1; /* variable names created by PROC UNIVARIATE */
   xaxis grid;
   yaxis grid min=0 label="Cumulative Proportion";
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Mar 2021 19:16:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726510#M21151</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-03-15T19:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: CDF plots (cumulative density) using proc univariate</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726688#M21162</link>
      <description>&lt;P&gt;Thanks. It worked well.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 10:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/CDF-plots-cumulative-density-using-proc-univariate/m-p/726688#M21162</guid>
      <dc:creator>Manj</dc:creator>
      <dc:date>2021-03-16T10:09:45Z</dc:date>
    </item>
  </channel>
</rss>

