|Date: ||Fri, 6 Feb 2009 11:58:51 +0530|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Alex S <alex4sas@YAHOO.CO.IN>|
|Subject: ||Re: Graph help please...|
|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
--- On Thu, 5/2/09, Mike Zdeb <msz03@ALBANY.EDU> wrote:
From: Mike Zdeb <msz03@ALBANY.EDU>
Subject: Re: Graph help please...
Date: Thursday, 5 February, 2009, 9:40 PM
hi ... makes some fake data, does a plot ...
* fake data;
do year = 2001 to 2005;
do month = 1 to 12;
do product = 1 to 2;
when (1) sales = ceil(500*ranuni(123))+300;
when (2) sales = ceil(100*ranuni(123))+100;
* turn year and month into a date;
dt = mdy(month,1,year);
format dt yymon.;
dt = 'DATE'
sales = 'SALES PER MONTH'
drop month year;
* 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;
* fix legend to get only one symbol per color;
legend1 shape=symbol(.001,2) label=('PRODUCT NUMBER');
* add white space around graph;
title2 a=90 ls=1;
title3 a=270 ls=1;
proc gplot data=test;
plot sales*dt=product / legend=legend1 haxis=axis1 vaxis=axis2 noframe;
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
> 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
Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/