Hi, I was trying to create a barchart with error bars, my x-axis= month, y-axis=CO2flux.. Here is my code; proc sort data=mydata.butner_new1 out=btnret; by spacing; run; proc means data=btnret nway mean clm noprint; by spacing; class month; var CO2flux; output out=new mean= lclm= uclm= / autoname; run; proc template; define statgraph barchart; begingraph; entrytitle 'Bar Chart with Error Bars'; layout gridded / border=false; layout datalattice columnvar=spacing / headerlabeldisplay=value cellwidthmin=50 columnheaders=bottom border=false columndatarange=union columnaxisopts=(display=(line tickvalues)) rowaxisopts=(offsetmin=0 linearopts=(tickvaluepriority=true) label='Mean CO2flux' griddisplay=on); layout prototype / walldisplay=(fill); barchart x=month y=CO2flux_mean / group=spacing barlabel=true name='bar' outlineattrs=(color=black); scatterplot x=month y=CO2flux_mean / group=spacing yerrorlower=CO2flux_lclm yerrorupper=CO2flux_uclm markerattrs=(size=0) name='scatter' errorbarattrs=(thickness=2) datatransparency=0.6; endlayout; endlayout; endlayout; endgraph; end; run; proc sgrender data=new template=barchart; run; and I got this result added as file, but it seems I did something wrong, the error bars are too big, how can fix this? Thank you.
... View more