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 (February 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 5 Feb 2009 11:10:31 -0500
Reply-To:     msz03@albany.edu
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mike Zdeb <msz03@ALBANY.EDU>
Subject:      Re: Graph help please...
Content-Type: text/plain;charset=iso-8859-1

hi ... makes some fake data, does a plot ...

* fake data; data test; do year = 2001 to 2005; do month = 1 to 12; do product = 1 to 2; select(product); when (1) sales = ceil(500*ranuni(123))+300; when (2) sales = ceil(100*ranuni(123))+100; end; output; end; end; end; run;

* turn year and month into a date; data test; set test; dt = mdy(month,1,year); format dt yymon.; label dt = 'DATE' sales = 'SALES PER MONTH' ; drop month year; run;

* choose a true type font; goptions reset=all ftext='tahoma' htext=2 gunit=pct;

* choose some symbols (differentiate products by color); symbol1 v=dot h=2 i=join c=blue ; symbol2 v=dot h=2 i=join c=red;

* add space on left/right of x-axis, rotate y-axis label; axis1 offset=(2,2)pct; axis2 label=(a=90);

* fix legend to get only one symbol per color; legend1 shape=symbol(.001,2) label=('PRODUCT NUMBER');

* add white space around graph; title1 ls=2; title2 a=90 ls=1; title3 a=270 ls=1; footnote1 ls=1;

proc gplot data=test; plot sales*dt=product / legend=legend1 haxis=axis1 vaxis=axis2 noframe; 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

> Hi All, > I do not know which graph procedure to use to get the correct graph. I have four fields namely Year, Month, Sales Amount($) and Product. > > In X axis I want to use both Month & Year and in the Y axis I want to use Sales Amount. > > The different Product's values should plot it on the graph with different color for Year-Month and Sales Amount. > > Could you please help me to get this?.. if you need any more information... please feel free to ask me. > Thank you in advance for your time. > > Thanks 'n' Regards > alex .S. > > > Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ > >


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