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:   Fri, 6 Feb 2009 11:58:51 +0530
Reply-To:   alex4sas@yahoo.co.in
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Alex S <alex4sas@YAHOO.CO.IN>
Subject:   Re: Graph help please...
Comments:   To: msz03@albany.edu
In-Reply-To:   <43806.150.142.232.4.1233850231.squirrel@webmail.albany.edu>
Content-Type:   text/plain; charset=iso-8859-1

Hi Mike Zdeb,            Thanks a lot for your time. it helped me a lot. I am sorry i did not explain my requirement completely.The requirement is.. I will always have only 3 years of data only. so i need month ( values like 01, 02.. 12) and Years (values like 2006,2007 & 2008) on X axis but i will have more products. The number of products  vary time to time. in your sample program you have given line plot. but i want that line filled with colors...i  mean instead of line i want shaded colors for each product.   Please hele me to get this graph. Once again thanks for your time.

Thanks 'n' Regards alex .S.

--- On Thu, 5/2/09, Mike Zdeb <msz03@ALBANY.EDU> wrote:

From: Mike Zdeb <msz03@ALBANY.EDU> Subject: Re: Graph help please... To: SAS-L@LISTSERV.UGA.EDU Date: Thursday, 5 February, 2009, 9:40 PM

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/ > > Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/


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