|
|
Regarding Graph output
Dear all,
I am creating graphs of change from baseline of mean scores by visits. In
my output I am getting some reverse bars as the mean change is negative. Is
there any way to get all of them upward? I used order=(-25 to 50 by 5). But
its not giving expected result. And also is there any way to get the mean
change number on the top of the bar?[I used these statements:sumvar=chbl
(change from baseline) type=mean outside=mean]. The bar width is 5(I put).
Still I am not getting the expected results. Would you please help me in
this regard.
Thank you.
|
|
0
|
|
|
|
Reply
|
titaan08 (9)
|
3/4/2010 1:57:09 AM |
|
hi ... here's an idea (I think I interpreted your question correctly)
* test data, three observations per year;
data test;
input year change;
output;
change = change + ceil(10 * ranuni(123));
output;
change = change - ceil(10 * ranuni(123));
output;
datalines;
2000 -10
2001 10
2002 20
2003 -25
2004 6
;
run;
* new variable ... all positive values;
data test;
set test;
y = change + 30;
run;
*
new labels for the y-axis when using the new variable
lowest value is the value used in the above data step
;
proc format;
value y
0 = '-30'
10 = '-20'
20 = '-10'
30 = '0'
40 = '10'
50 = '20'
60 = '30'
;
run;
*
make an annotate data set to label chart when using new variable
cannot use "outside=mean" since the variable is rescaled and wrong values will appear
;
proc summary data=test nway;
var change;
class year;
output out=stats mean=;
run;
data anno;
retain xsys ysys '2' hsys '3' function 'label' size 2 position '2' style '"calibri"';
set stats (rename=(year=midpoint));
text = put(change,5.2);
run;
goptions reset=all ftext='calibri' htext=2 gunit=pct hpos=40;
axis1 label=(a=90 "ORIGINAL Y-AXIS");
axis2 order=0 to 60 by 10 label=(a=90 "MODIFIED Y-AXIS");
*
use the new variable, the format, and the annotate data set for the 2nd chart
all the bars go UP in the 2nd chart and are labeled with the mean for each year
;
proc gchart data=test;
vbar year / type=mean discrete sumvar=change raxis=axis1 outside=mean;
run;
vbar year / type=mean discrete sumvar=y raxis=axis2 href=30 annotate=anno;
format y y.;
run;
quit;
--
Mike Zdeb
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475
>Dear all,
>I am creating graphs of change from baseline of mean scores by visits. In
>my output I am getting some reverse bars as the mean change is negative. Is
>there any way to get all of them upward? I used order=(-25 to 50 by 5). But
>its not giving expected result. And also is there any way to get the mean
>change number on the top of the bar?[I used these statements:sumvar=chbl
>(change from baseline) type=mean outside=mean]. The bar width is 5(I put).
>Still I am not getting the expected results. Would you please help me in
>this regard.
>Thank you.
|
|
0
|
|
|
|
Reply
|
msz03 (782)
|
3/4/2010 3:35:00 PM
|
|
|
1 Replies
162 Views
(page loaded in 0.049 seconds)
Similiar Articles: regarding summary table on sashelp.class dataset???? - comp.soft ...PROC Freq - Output - comp.soft-sys.sas regarding summary table on sashelp.class dataset???? - comp.soft ..... low- 80='<80' 80-120='80-120' 120-high='>120' ; run ; proc ... proc logistic with odds ratio in output table - comp.soft-sys.sas ...Question regarding PROC SURVEYLOGISTIC - comp.soft-sys.sas ... proc logistic with odds ratio in output table - comp.soft-sys.sas ... Question regarding PROC SURVEYLOGISTIC ... Query regarding SAS Macros & ODS - comp.soft-sys.sasI want to use different data sets and display output ... crd_mk noobs; /*print appended Anova table ... pdf layout question - comp.soft-sys.sas Question regarding ... Question regarding PROC SURVEYLOGISTIC - comp.soft-sys.sas ...proc logistic with odds ratio in output table - comp.soft-sys.sas ... Question regarding PROC SURVEYLOGISTIC - comp.soft-sys.sas ... proc logistic with odds ratio in ... ODS Html Style Graph with SGPLOT in Excel Sheet - comp.soft-sys ...Regarding SAS Macro - comp.soft-sys.sas ODS Html Style Graph with SGPLOT in Excel ... ods listing; *ok, now we have a nice excel sheet ... ods trace on; ods output table ... change box colors in bar graph - comp.graphics.apps.gnuplot ...... new to gnuplot and I'm trying to plot a bar graph with ... I really liked your first suggestion, > regarding the box ... set format y "10^{%L}" set offsets 1,1 set output "tmp ... Print Table of values - comp.soft-sys.math.scilab} The output is done with a print command of the form print i, ar[i] I have ... ... regarding summary table on sashelp.class dataset???? - comp.soft ... Hi all, I tried to create ... predicted probabilities in PROC SURVEYLOGISTIC - comp.soft-sys.sas ...Neither OUTPUT statement nor respective ODS > table seem to be avalable. ... to calculate the predicted probability ... Question regarding PROC Regarding SAS Macro - comp.soft-sys.sas... To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Regarding SAS ... ODS Html Style Graph with SGPLOT in Excel Sheet - comp ... I want to use different data sets and display output ... Histogram by the Class ? - comp.soft-sys.sasregarding gmdistribution - comp.soft-sys.matlab Histogram by ... Max file size for ODS RTF output. - comp.soft-sys.sas ... want to know the code to make this graph, the graph ... Regarding PLAN_TABLE OUTPUT - DBAsupport.com ForumsOracle Forums > Oracle Database Administration ... Guys, I ran the utlxpls.sql on the PLAN_TABLE and I got output with costs and ... http://otn.oracle.com/docs ... OBJECTIVE: (AS DISTINCT TO EQUITY) GOAL OF ACTORS: ENVIRONMENT ...THE OUTPUT DECISION REMINDER FROM CHAPTER 7, regarding basic assumption---the firm ... In graph A, notice how, as the price rises above $6, each new ... 7/27/2012 11:43:21 PM
|
|
|
|
|
|
|
|
|