<?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: correct graphics program in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/314135#M313049</link>
    <description>&lt;P&gt;To change the color of markers, add the statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;styleattrs datacontrastcolors=(black yellow);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to proc sgplot.&lt;/P&gt;</description>
    <pubDate>Thu, 24 Nov 2016 18:00:11 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-11-24T18:00:11Z</dc:date>
    <item>
      <title>correct graphics program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313624#M313044</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data MCint;
seed1=12345;
do isim=1 to 100000;
Ux=ranuni(seed1);
Uy=ranuni(seed1);
Under = (Uy&amp;lt;=sqrt(1-Ux**2));
drop isim;
output;
end;

ODS OUTPUT OneWayFreqs=data_freq;
proc freq;
table Under;
run;
ODS OUTPUT CLOSE;

proc print data =data_freq;run;
data summary; set data_freq;
if under=1;
PI_est=4*Percent/100;
prop_est=Percent/100;
SE_PI_EST=4*sqrt(prop_est*(1-pop_est)/10000);
PI_CI_Low=PI_est-2*SE_PI_EST;
PI_CI_Up=PI_est-2*SE_PI_EST;
put ' ------------------------------------------';
put ' | MC Integration estimate of PI        |';
put ' ------------------------------------------';
put ' PI(estimate)=' PI_est;
put ' SE[PI(estimate)]=' SE_PI_EST;
put ' Approx. 95% CI=' PI_CI_Low' ,' PI_CI_Up;
put ' ' ;
put ' Based on 10,000 simulated points.' ;
put ' ------------------------------------------' ;
run;

ODS RTF file= ' C:\SAS-programs\MC-fig.rtf';
proc gplot data=MCint;
  plot Uy*Ux=Under ;
  ods graphics / reset width=50px height=300px;
  symbol1 value=dot color=black;
  symbol2 value=dot color=yellow;
  run;
ODS RTF CLOSE;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have few queestion.&lt;/P&gt;&lt;P&gt;First, why the lines after 'put' don't appear?&lt;/P&gt;&lt;P&gt;Secon, how should I control the graph size?&amp;nbsp; It seems that I can't perfectly graph square by chnging the width and height.&lt;/P&gt;&lt;P&gt;Finally, I want to mark the coordinate with cross rather than dot but I can't control it by rewriting cross.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 00:20:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313624#M313044</guid>
      <dc:creator>karen8169</dc:creator>
      <dc:date>2016-11-23T00:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: correct graphics program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313625#M313045</link>
      <description>&lt;P&gt;Couple of issues.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Don't include the ODS OUTPUT CLOSE statement. I'm not sure what you're expecting but it's unnecessary and can cause issues later on. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PUT outputs to the log, so check if the log has the information you're desiring. If that's not the functionality you want, clarify please.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS/Graph procs such as GPLOT Don't use ODS graphics options. And your ODS graphics options would have to be BEFORE the proc , order of operations issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would recommend switching to SGPLOT for more functionality.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Place your ODS graphics statement before the proc. symbol statements work with GPlot but you need different statements for SGPLOT - see the docs.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you need further help please post back.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 00:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313625#M313045</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-11-23T00:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: correct graphics program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313654#M313046</link>
      <description>&lt;P&gt;The data _null_ step still needs some tweaking, but it should be something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data MCint;
call streaminit(12345);
do isim=1 to 10000;
    Ux = rand("UNIFORM");
    Uy = rand("UNIFORM");
    Under = (Uy&amp;lt;=sqrt(1-Ux**2));
    drop isim;
    output;
    end;
run;

ODS OUTPUT OneWayFreqs=data_freq;
proc freq;
table Under;
run;

proc print data =data_freq;run;

data _null_; 
set data_freq;
if under=1;
PI_est=4*Percent/100;
prop_est=Percent/100;
SE_PI_EST=4*sqrt(prop_est*(1-pop_est)/10000);
PI_CI_Low=PI_est-2*SE_PI_EST;
PI_CI_Up=PI_est-2*SE_PI_EST;
file print;
put ' ------------------------------------------';
put ' | MC Integration estimate of PI          |';
put ' ------------------------------------------';
put ' PI(estimate)=' PI_est;
put ' SE[PI(estimate)]=' SE_PI_EST;
put ' Approx. 95% CI=' PI_CI_Low' ,' PI_CI_Up;
put ' ' ;
put ' Based on 10,000 simulated points.' ;
put ' ------------------------------------------' ;
run;

ods graphics / imagename="Circle" antialiasmax=11000;
proc sgplot data=MCint aspect=1;
scatter x=Ux y=Uy / group=Under markerattrs=(symbol=Plus size=5);
xaxis min=0 max=1;
yaxis min=0 max=1;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/5955i882905C257F0BDBF/image-size/original?v=v2&amp;amp;px=-1" border="0" alt="Circle.png" title="Circle.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 04:03:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313654#M313046</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-23T04:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: correct graphics program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313756#M313047</link>
      <description>&lt;P&gt;You might be interested in reading the article &lt;A href="http://blogs.sas.com/content/iml/2016/03/14/monte-carlo-estimates-of-pi.html" target="_self"&gt;"Monte Carlo estimates of pi."&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, you can use the OUT= option on the TABLES statement in PROC FREQ. Then you can suppress output by using the NOPRINT option on the PROC FREQ stmt. You don't need to use ODS output..&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 12:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313756#M313047</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-11-23T12:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: correct graphics program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313976#M313048</link>
      <description>&lt;P&gt;How can I change the color as the previous picture I made?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 06:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/313976#M313048</guid>
      <dc:creator>karen8169</dc:creator>
      <dc:date>2016-11-24T06:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: correct graphics program</title>
      <link>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/314135#M313049</link>
      <description>&lt;P&gt;To change the color of markers, add the statement&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;styleattrs datacontrastcolors=(black yellow);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to proc sgplot.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 18:00:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/correct-graphics-program/m-p/314135#M313049</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-11-24T18:00:11Z</dc:date>
    </item>
  </channel>
</rss>

