LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 31 May 2006 08:11:45 -0700
Reply-To:     Daniel Ide <spam@CASTEX.DE>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Daniel Ide <spam@CASTEX.DE>
Organization: http://groups.google.com
Subject:      Re: ODS Graphics: Bar charts again
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

Hey again,

I still have the same problems as before (bars next to each other instead of stacking, value written in a bar), but I decided[1] to provide you with a minimalistic example of how I am using my template.

Still hoping, Daniel

[1] thanks to Ken ;-)

/********** start ods **************/ ODS HTML style=Journal GPATH="c:\temp" file="c:\temp\output.tmp" ; ODS GRAPHICS / IMAGEFMT=PNG RESET;

/********** CREATE THE TEMPLATE **************/ PROC template; DEFINE statgraph GraL.barchart; DYNAMIC _TITLE _FOOTNOTE _XLABEL _YLABEL _NORMAL_MIN _NORMAL_MAX; LAYOUT gridded; ENTRYTITLE _TITLE / halign=center padbottom = 5; LAYOUT overlay / xaxisopts=(label=_XLABEL) yaxisopts=(label=_YLABEL DISPLAY=ALL); /* Print Bar Chart */ barchartparm x=Category y=nobs /* group=group /*orient=horizontal*/; /* Print Normal Range */ lineparm yintercept=_NORMAL_MIN / linecolor=GraphReferenceLines:color transparency=.5 extreme=true; lineparm yintercept=_NORMAL_MAX / linecolor=GraphReferenceLines:color transparency=.5 extreme=true; /* workaround: scaling y-axis */ lineparm yintercept=_YMAX / transparency=1; lineparm yintercept=_YMIN / transparency=1; /* draw y=0 ? */ IF (_YMIN < 0) lineparm yintercept=0 / linecolor=GraphReferenceLines:color transparency=0 extreme=true; ENDIF; ENDLAYOUT; ENTRYFOOTNOTE _FOOTNOTE / halign=left; ENDLAYOUT; END; RUN;

/*************** create example data *****************/ DATA tmp; INPUT category $ nobs group; LINES; mild 3 1 mild 5 2 moderate 14 2 moderate 12 1 severe 2 2 severe 1 1 RUN; QUIT;

/******************* print it ****************/ DATA _null_; SET tmp;

FILE PRINT ods=(template='GraL.barchart'); PUT _ods_; RUN;

/************ close ods **************/ ODS GRAPHICS OFF; ODS HTML CLOSE;


Back to: Top of message | Previous page | Main SAS-L page