<?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 Plot of means in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269610#M9644</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing project about how affect meals on blood glucose.&lt;/P&gt;&lt;P&gt;I have following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA glucose;
	infile 'E:\GLUCOSE.DAT' EXPANDTABS;
	input id g1-g10;
	tm=int((_n_-1)/6)+1;	
run;


DATA missqlucose;
SET glucose;
if g9=-1 then g9=.;
if g10=-1 then g10=.;
run;


PROC plot data=missqlucose (firstobs = 1 obs = 6);
run;

DATA glucose1;
set missqlucose (firstobs = 1 obs = 6);
run;

PROC TRANSPOSE data=glucose1 out=gtrans1 name=time prefix=p;
VAR g1-g10;
run;

PROC PRINT DATA= gtrans1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Now i need to make one plot of the separate tm class means across gk, where k&amp;nbsp;is from 1:10 (in other words, for g1 g2 g3....g10)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. i attached fili that in infile (see above), just change *.txt to *.dat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 May 2016 02:36:52 GMT</pubDate>
    <dc:creator>bigban777</dc:creator>
    <dc:date>2016-05-11T02:36:52Z</dc:date>
    <item>
      <title>Plot of means</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269610#M9644</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am doing project about how affect meals on blood glucose.&lt;/P&gt;&lt;P&gt;I have following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA glucose;
	infile 'E:\GLUCOSE.DAT' EXPANDTABS;
	input id g1-g10;
	tm=int((_n_-1)/6)+1;	
run;


DATA missqlucose;
SET glucose;
if g9=-1 then g9=.;
if g10=-1 then g10=.;
run;


PROC plot data=missqlucose (firstobs = 1 obs = 6);
run;

DATA glucose1;
set missqlucose (firstobs = 1 obs = 6);
run;

PROC TRANSPOSE data=glucose1 out=gtrans1 name=time prefix=p;
VAR g1-g10;
run;

PROC PRINT DATA= gtrans1;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Now i need to make one plot of the separate tm class means across gk, where k&amp;nbsp;is from 1:10 (in other words, for g1 g2 g3....g10)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. i attached fili that in infile (see above), just change *.txt to *.dat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 02:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269610#M9644</guid>
      <dc:creator>bigban777</dc:creator>
      <dc:date>2016-05-11T02:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Plot of means</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269665#M9645</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you just want the mean then you can use the vbar statement in Proc SGPLOT. Below is the code that you can use to get this. I wasn't sure if you wanted means of g1-g10 or means of p1-p6, but you can adjust the code accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS, it may be useful to see the variation in the data, so you could also look at doing a boxplot. or plotting the mean and confidence intervals.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sort data = gtrans1;&lt;BR /&gt;&amp;nbsp; by time;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc transpose data = gtrans1 out = gtrans_stacked;&lt;BR /&gt;&amp;nbsp; var p1 - p6;&lt;BR /&gt;&amp;nbsp; by time;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc sgplot data = gtrans_stacked;&lt;BR /&gt;&amp;nbsp; vbar _NAME_ / response = COL1 stat= mean;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 08:45:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269665#M9645</guid>
      <dc:creator>djrisks</dc:creator>
      <dc:date>2016-05-11T08:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Plot of means</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269836#M9646</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thank you for code. How to put values of means next to each bar on that graph?&lt;/P&gt;</description>
      <pubDate>Wed, 11 May 2016 18:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Plot-of-means/m-p/269836#M9646</guid>
      <dc:creator>bigban777</dc:creator>
      <dc:date>2016-05-11T18:32:14Z</dc:date>
    </item>
  </channel>
</rss>

