<?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 Gchart in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651418#M22379</link>
    <description>&lt;P&gt;It means you are using actual data values to determine where items go on a plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the documentation at:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=graphref&amp;amp;docsetTarget=annotate_xsys.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=graphref&amp;amp;docsetTarget=annotate_xsys.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 May 2020 15:22:33 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-05-28T15:22:33Z</dc:date>
    <item>
      <title>proc Gchart</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651408#M22378</link>
      <description>&lt;P&gt;Hi Everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;A month ago I have started sas, can anyone tell me why did we define xsys=2 ysys=2 and later xsys=7..any specific logic. Please help me and thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt; /* Set the graphics environment */
goptions reset=all cback=white border htitle=12pt htext=10pt;  

data a;
   input Mid_Var $ Resp_Var;
   datalines;
AAA 5
AAA 4
AAA 7
BBB 7
BBB 6
BBB 9
CCC 4
CCC 3
CCC 6
DDD 5
DDD 4
DDD 7
;
run;

 /* Use PROC MEANS to calculate the statistics */
 /* needed to create the Annotate data set.    */
proc means mean std data=a noprint;
   by mid_var;
   output out=b mean=mean std=std;
run;

 /* Create the Annotate data set */
data anno;
   length color function $8;
   retain xsys ysys '2' hsys '4' when 'a' color 'depk' size 1;
   set b;

   /* Lower tick */
   function='move'; xsys='2'; ysys='2'; 
   midpoint=mid_var; y=mean-std; 
   output;
   function='draw'; 
   xsys='7'; ysys='2'; x=-2; y=mean-std;  
   output;
   function='draw'; xsys='7'; ysys='2'; 
   x=+4; y=mean-std;  
   output;

   /* Upper tick */
   function='move'; xsys='2'; ysys='2'; 
   midpoint=mid_var; y=mean+std; 
   output;
   function='draw'; xsys='7'; ysys='2'; 
   x=-2; y=mean+std;  
   output;
   function='draw'; xsys='7'; ysys='2'; 
   x=+4; y=mean+std;  
   output;

   /* Join upper and lower */
   function='move'; xsys='2'; ysys='2'; 
   midpoint=mid_var; y=mean-std;  
   output;
   function='draw'; xsys='2'; ysys='2'; 
   midpoint=mid_var; y=mean+std;  
   output;
run;

axis1 order=(0 to 10 by 5)
      label=(angle=90 h=11pt 'Response Variable'); 
axis2 label=(h=11pt 'Midpoint Variable');   

title1 'One Std of the Mean';

 /* Create the graph using the ANNO= option */
 /* on the VBAR statement.                  */
proc gchart data=a;
   vbar mid_var / anno=anno raxis=axis1 maxis=axis2 
                  type=mean sumvar=resp_var
	          width=10 space=4; 
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 15:03:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651408#M22378</guid>
      <dc:creator>Naveen1111</dc:creator>
      <dc:date>2020-05-28T15:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc Gchart</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651418#M22379</link>
      <description>&lt;P&gt;It means you are using actual data values to determine where items go on a plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See the documentation at:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=graphref&amp;amp;docsetTarget=annotate_xsys.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=graphref&amp;amp;docsetTarget=annotate_xsys.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 15:22:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651418#M22379</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-28T15:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: proc Gchart</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651425#M22381</link>
      <description>Why did we use xsys=7 ...instead of 7 i tried with 6 but not getting the same output. There must b some logic. Also advise me things which we must keep in our mind while creating graph.</description>
      <pubDate>Thu, 28 May 2020 15:29:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651425#M22381</guid>
      <dc:creator>Naveen1111</dc:creator>
      <dc:date>2020-05-28T15:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: proc Gchart</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651429#M22382</link>
      <description>&lt;P&gt;The documentation explains what XSYS=7 means. I don't know why it was chosen in your program, and certainly different choices may result in no difference on the graph for some data and some graphs.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 15:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651429#M22382</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-28T15:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: proc Gchart</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651444#M22383</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/327047"&gt;@Naveen1111&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Why did we use xsys=7 ...instead of 7 i tried with 6 but not getting the same output. There must b some logic. Also advise me things which we must keep in our mind while creating graph.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;First is what is the graph supposed to do. Second know the tools. Gchart is old and supports a small number of chart types. Sgplot, and Sgpanel, support around 29 types of plots (counting variations of HBAR/VBAR and HBOX/VBOX and similar as one type).&lt;/P&gt;
&lt;P&gt;Since I see comments about upper and lower tick I would guess that you are connecting to points in a vertical line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which might mean that it is time to investigate Proc SGPLOT with a HGHLOW graph statement.&lt;/P&gt;
&lt;P&gt;One of the very big improvements with the newer procedures is the ability to overlay different graphs (within limitations).&lt;/P&gt;
&lt;P&gt;You would use a VBARBASIC to do the bars and a HIGHLOW with variables in a single data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or if the values are supposed to be error bars on the bar graph then perhaps you would use a simple VBAR with the LIMITS=BOTH option which can calculate error bars. And the option LIMITSTAT= could calculate error bars for Confidence limits, standard deviation or standard error when using STAT=Mean.&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 16:06:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651444#M22383</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-05-28T16:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: proc Gchart</title>
      <link>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651469#M22384</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/327047"&gt;@Naveen1111&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=grstatproc&amp;amp;docsetTarget=n0yjdd910dh59zn1toodgupaj4v9.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;PROC SGPLOT&lt;/A&gt; step using several options to make the created plot virtually identical to the bar chart you created with PROC GCHART (but possibly fewer options would be okay for your purposes):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on / border=off;
title 'One Std of the Mean';

proc sgplot data=a noautolegend;
vbar mid_var / response=resp_var stat=mean limitstat=stddev barwidth=0.7               
               fillattrs=(color='CX7C95CA') limitattrs=(color='depk');
xaxis label='Midpoint Variable' display=(noticks);
yaxis label='Response Variable' values=(0 to 10 by 5) minor minorcount=9;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With that you &lt;EM&gt;don't&lt;/EM&gt; need&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;a SAS/GRAPH license&lt;/LI&gt;
&lt;LI&gt;to calculate descriptive statistics in a separate PROC MEANS step&lt;/LI&gt;
&lt;LI&gt;to create an annotation dataset in a separate DATA step&lt;/LI&gt;
&lt;LI&gt;to think about different coordinate systems (XSYS, YSYS).&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 28 May 2020 16:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/proc-Gchart/m-p/651469#M22384</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-05-28T16:40:16Z</dc:date>
    </item>
  </channel>
</rss>

