<?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: Need help using proc SGPLOT in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674942#M20339</link>
    <description>&lt;P&gt;final output should be like this. Please help to edit the code to get required output.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48019i6955ACB56A85FE42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="output.png" alt="output.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 10:45:36 GMT</pubDate>
    <dc:creator>rakul</dc:creator>
    <dc:date>2020-08-06T10:45:36Z</dc:date>
    <item>
      <title>Need help using proc SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674821#M20333</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have my SAS code as below and need few changes here to get the desired output (image attached).&lt;/P&gt;&lt;P&gt;Request community to make necessary changes to get desired output. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My requirements:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;need to update the range of the x-axis to be 50-100&lt;/LI&gt;&lt;LI&gt;I want to Change the circle into a triangle for dot_value=SUN; make it slightly larger than the pies and color it red&lt;/LI&gt;&lt;LI&gt;Just before the 2-headed arrow lines, write the citation (dot_count) for dot_value=SUN in 2019 and enclose in brackets.&lt;/LI&gt;&lt;LI&gt;i want to add an x-axis for reference below the chart&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;BR /&gt;libname test ' C:\Test';&lt;BR /&gt;%let length=function $8. ;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table prep_fac as&lt;BR /&gt;select distinct fac_order, fac_label&lt;BR /&gt;from test.driver&lt;BR /&gt;;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;data anno_line;&lt;BR /&gt;length &amp;amp;length.;&lt;BR /&gt;set prep_fac;&lt;BR /&gt;function='arrow';drawspace='datavalue';&lt;BR /&gt;x1=0;y1=fac_order;&lt;BR /&gt;x2=100;y2=y1;&lt;BR /&gt;direction='both';linecolor='grey';linethickness=1;shape='filled';linepattern='1';&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data anno_label;&lt;BR /&gt;length &amp;amp;length.;&lt;BR /&gt;set prep_fac;&lt;BR /&gt;function='text';x1space='graphpercent';y1space='datavalue';&lt;BR /&gt;x1=1;y1=fac_order;&lt;BR /&gt;label=strip(fac_label);width=100;&lt;BR /&gt;justify='left';textcolor='black';textsize=20;textfont='Calibri';anchor='left';&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data anno_dot;&lt;BR /&gt;length &amp;amp;length.;&lt;BR /&gt;set test.driver;&lt;BR /&gt;where year="2019";&lt;BR /&gt;function='oval';drawspace='datavalue';&lt;BR /&gt;x1=dot_value;y1=fac_order;height=10;width=height;&lt;BR /&gt;heightunit='pixel';widthunit='pixel';&lt;BR /&gt;fillcolor=color_f;display='all';&lt;BR /&gt;output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data anno;&lt;BR /&gt;set&lt;BR /&gt;anno_line&lt;BR /&gt;anno_label&lt;BR /&gt;anno_dot&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods html path = "C:\Test"&lt;BR /&gt;gpath = "C:\Test"&lt;BR /&gt;file = "Test.html";&lt;BR /&gt;ods graphics on / imagefmt = gif;&lt;BR /&gt;ods graphics on / width=1800px height=1100px;&lt;BR /&gt;ods graphics on / reset=index imagename = "Kebab";&lt;/P&gt;&lt;P&gt;data temp;&lt;BR /&gt;a=0;b=10; output;&lt;BR /&gt;a=10;b=0; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc sgplot data=temp sganno=anno noborder;&lt;BR /&gt;scatter x=a y=b;&lt;BR /&gt;xaxis min=0 max=100 display=none offsetmin=0.3 offsetmax=0.05;&lt;BR /&gt;yaxis min=1 max=8 display=none offsetmin=0.05 offsetmax=0.05;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 18:55:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674821#M20333</guid>
      <dc:creator>rakul</dc:creator>
      <dc:date>2020-08-05T18:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need help using proc SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674901#M20336</link>
      <description>&lt;P&gt;1. Please provide data we can use to run the code&lt;/P&gt;
&lt;P&gt;2. Post the code using the appropriate icon (above the text box) so it is formatted properly&lt;/P&gt;
&lt;P&gt;3. Do not attach MS office files. For images, there also is a dedicated icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 05:46:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674901#M20336</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-06T05:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help using proc SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674938#M20338</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;Thanks&amp;nbsp;for&amp;nbsp;the&amp;nbsp;response!&amp;nbsp;Please&amp;nbsp;find&amp;nbsp;below.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;My requirements:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;OL&gt;&lt;LI&gt;need to update the range of the x-axis to be 50-100&lt;/LI&gt;&lt;LI&gt;I want to Change the circle into a triangle for dot_value=SUN; make it slightly larger than the pies and color it red&lt;/LI&gt;&lt;LI&gt;Just before the 2-headed arrow lines, write the citation (dot_count) for dot_value=SUN in 2019 and enclose in brackets.&lt;/LI&gt;&lt;LI&gt;i want to add an x-axis for reference below the chart&lt;/LI&gt;&lt;/OL&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;&lt;BR /&gt;libname test ' C:\Test';
%let length=function $8. ;

proc sql;
create table prep_fac as
select distinct fac_order, fac_label
from test.driver
;
quit;

data anno_line;
length &amp;amp;length.;
set prep_fac;
function='arrow';drawspace='datavalue';
x1=0;y1=fac_order;
x2=100;y2=y1;
direction='both';linecolor='grey';linethickness=1;shape='filled';linepattern='1';
output;
run;

data anno_label;
length &amp;amp;length.;
set prep_fac;
function='text';x1space='graphpercent';y1space='datavalue';
x1=1;y1=fac_order;
label=strip(fac_label);width=100;
justify='left';textcolor='black';textsize=20;textfont='Calibri';anchor='left';
output;
run;

data anno_dot;
length &amp;amp;length.;
set test.driver;
where year="2019";
function='oval';drawspace='datavalue';
x1=dot_value;y1=fac_order;height=10;width=height;
heightunit='pixel';widthunit='pixel';
fillcolor=color_f;display='all';
output;
run;

data anno;
set
anno_line
anno_label
anno_dot
;
run;

ods html path = "C:\Test"
gpath = "C:\Test"
file = "Test.html";
ods graphics on / imagefmt = gif;
ods graphics on / width=1800px height=1100px;
ods graphics on / reset=index imagename = "Kebab";

data temp;
a=0;b=10; output;
a=10;b=0; output;
run;

proc sgplot data=temp sganno=anno noborder;
scatter x=a y=b;
xaxis min=0 max=100 display=none offsetmin=0.3 offsetmax=0.05;
yaxis min=1 max=8 display=none offsetmin=0.05 offsetmax=0.05;
run;&lt;BR /&gt;ods _all_ close;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48018iD158237C9F3C14D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="output.png" alt="output.png" /&gt;&lt;/span&gt;
&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 10:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674938#M20338</guid>
      <dc:creator>rakul</dc:creator>
      <dc:date>2020-08-06T10:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help using proc SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674942#M20339</link>
      <description>&lt;P&gt;final output should be like this. Please help to edit the code to get required output.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="output.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48019i6955ACB56A85FE42/image-size/medium?v=v2&amp;amp;px=400" role="button" title="output.png" alt="output.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 10:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/674942#M20339</guid>
      <dc:creator>rakul</dc:creator>
      <dc:date>2020-08-06T10:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need help using proc SGPLOT</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/675535#M20362</link>
      <description>&lt;P&gt;Moved to &lt;EM&gt;graphics&lt;/EM&gt; community , hoping you'll get help there&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 05:34:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Need-help-using-proc-SGPLOT/m-p/675535#M20362</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-08-10T05:34:11Z</dc:date>
    </item>
  </channel>
</rss>

