Date: Tue, 28 Mar 2006 12:32:42 -0800
Reply-To: Irin later <irinfigvam@YAHOO.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Irin later <irinfigvam@YAHOO.COM>
Subject: Re: How to customize graphic diagram?
In-Reply-To: <OFF69B2DCB.6A9A460E-ON8525713B.006F767A-8525713B.00702ED0@dom.com>
Content-Type: text/plain; charset=iso-8859-1
Nat,
Thank you for your response.
I generated diagrams with dashed line using the following code:
proc means data=studybase mean nway;
var physical_score_f emotional_score_f;
class monthstudybase;
output out=studybase_ mean=;
run;
TITLE font='Times-Roman' 'Mean Physical and emotional score for each question in Baseline';
symbol1 i=join c=red L=1;
symbol2 i=join c=green L=2
value=dot
height=1;
%let average=3;
proc gplot data=studybase_;
plot physical_score_f * monthstudybase /overlay haxis=1 to 8 by 2
vaxis=1 to 16 by 1
vref=&average.;
plot2 emotional_score_f * monthstudybase /overlay /* haxis=1 to 8 by 1*/
vaxis=0 to 8 by 1
vref=&average.;
run;
quit;
It did generated dashed line.
However it generated some additional parallel to horizontal axis line. Here is how it looks like after my code: http://www.geocities.com/irinaroscom
Why it is generated and how can I eliminate this line?
Thank you in advance!
Irin
Nathaniel_Wooding@Dom.com wrote:
Irin
The following will help a little.
Please note that when I run this code on a Win XP machine (SAS V9.1), it
will not give me Times Roman. This will depend on your operating system and
available fonts. Please see
http://support.sas.com/91doc/docMainpage.jsp
and follow the links to see the documentation on Fonts.
Now, you can specify the line types using the l= nn in the symbol
statements as in the example below.
Note that I added the option "overlay" to both plot statements.
Note also that I removed the haxis definition in the plot2 statement since
SAS does not recognize such a definition in the second plot statement.
I simplified your names a little to make my typing easier -- I'm lazy .
Finally, this will not produce a legend statement. You could add one using
annotation but before we talk about that code, do you really need two
verticle axes? Would your graph be suitable if you had only one axis? The
code to produce this and add a legend is fairly simple.
Nat Wooding
title font='Times-Roman' 'Test Plot';
symbol1 i=join c=red l=1 ;** l identifies the line type;
symbol2 i=join c=green l=2;
%let average = 3;
data a;
input phys emot month;
cards;
2 3 1
4 7 2
5 2 6
14 . 11
15 . 12
proc gplot data=a;
plot phys * month /overlay haxis=1 to 16 by 2
vaxis=1 to 16 by 1
vref=&average.;
plot2 emot * month / overlay /* haxis=1 to 8 by 1*/
vaxis=0 to 8 by 1
vref=&average.;
run;
quit;
Irin later
.COM> To
Sent by: "SAS(r) SAS-L@LISTSERV.UGA.EDU
Discussion" cc
GA.EDU> Subject
How to customize graphic diagram?
03/24/2006 12:52
PM
Please respond to
Irin later
.COM>
Hi everybody,
Using the code below I generated a plot which I needed. However I would
like to distinguish one line (physical) of another line (emotional).
How can I do it and incorporate into the code below?
How can I do a dashed line (for ex.emotional) for one of the diagram’s
line?
Also…how can I assign a font (Time Roman) as well as a font size to the
title?
Is it possible to generate a legend?
Thank you in advance.
Irin
*********************************************************************
/****Mean Physical & Emotional Score in each month for Base *****/
proc means data=studybase mean nway;
var physical_score_f emotional_score_f;
class monthstudybase;
output out=studybase_ mean=;
run;
TITLE 'Mean Physical and emotional score for each question in Baseline';
symbol1 interpol=join
value=dot
height=1;
proc gplot data=studybase_;
plot physical_score_f * monthstudybase / haxis=1 to 16 by 2
vaxis=1 to 16 by 1
vref=&average.;
plot2 emotional_score_f * monthstudybase / haxis=1 to 8 by 1
vaxis=0 to 8 by 1
vref=&average.;
run;
quit;
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC for low,
low rates.
-----------------------------------------
CONFIDENTIALITY NOTICE: This electronic message contains
information which may be legally confidential and/or privileged and
does not in any case represent a firm ENERGY COMMODITY bid or offer
relating thereto which binds the sender without an additional
express written confirmation to that effect. The information is
intended solely for the individual or entity named above and access
by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying, distribution, or use of the
contents of this information is prohibited and may be unlawful. If
you have received this electronic transmission in error, please
reply immediately to the sender that you have received the message
in error, and delete it. Thank you.
---------------------------------
New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.