LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 1999, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 29 Nov 1999 13:16:10 -0500
Reply-To:     "Slagle, Paul" <Paul.Slagle@STATPROBE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Slagle, Paul" <Paul.Slagle@STATPROBE.COM>
Subject:      Re: Points labels in Gplot Procedure (answer and question?)
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

That works fine, as long as the symbol you want does not change for each record. If however, you want to produce a plot where each record represents a unique point, which needs to be identified, than the annotate facility would need to be used.

Example: (Note: the following code is an example in rough form and is NOT executable!)

Data toplot; input x y text; retain xsys ysys '2'; function='label'; cards; 2 4 IN 3 4 MI 1 5 KY 6 7 CA 3 2 FL ; run;

symbol1 v=NONE; proc gplot data=toplot annotate=toplot; plot y*x; run;

Paul Slagle -----Original Message----- From: Ya Huang [mailto:Y.Huang@ORGANONINC.COM] Sent: Monday, November 29, 1999 11:09 AM To: SAS-L@LISTSERV.VT.EDU Subject: Re: Points labels in Gplot Procedure (answer and question?)

Jose,

I don't think annotate is necessary for a single plot if you just wanted to replace the default symbol with some text string. I assume that is what you wanted because you said 'variable label', but not 'variable value'. Here is the online help for SYMBOL statement:

--------- SYMBOL: VALUE Option

VALUE | V= special-symbol | text-string | NONE

Specifies a plot symbol for the data points. If you use VALUE= text-string to specify a plot symbol, you must also use the FONT= option to specify a symbol font or a text font. VALUE= NONE produces a plot with no symbols at the data points.

By default, VALUE= PLUS , which produces the + symbol for the plot symbol. ---------

The above online help tells us, we can actually put some text string to the place where symbol supposed to be. Following is a sample code, where v='***' is the place to put your var label.

GOPTIONS RESET=ALL DEVICE=VT340;

DATA XX; DO X=1 TO 6 BY 0.5; Y=100*sin(x); Z=100*COS(x); OUTPUT; END;

SYMBOL1 I=JOINT V='yyy' FONT=SWISS; SYMBOL2 I=JOINT V='ZZZ' FONT=CENTX;

PROC GPLOT; PLOT Y*X=1 Z*X=2 /OVERLAY; RUN;

Run this sample and you'll see '+' is replaced by 'yyy'.

OK, now my question:

Why it only works for a single plot? If I want to overlay two plots, the second one will still use the first symbol, even though I have specify the symbol number for different plot? In my sample code, 'yyy' appears on both of y and z.

Somebody has an explanation for this?

Ya Huang Organon Inc. 475 Prospect Ave. West Orange, NJ 07052 973-325-5407

> -----Original Message----- > From: José Ailton Alencar andrade [mailto:andrade@INEP.GOV.BR] > Sent: Monday, November 29, 1999 8:25 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Points labels in Gplot Procedure > > > Hello All, > > How do I replace the plot symbols (dot, star, etc.) to a variable > label? I think we have to use the Annotate Facility. But I have not > clearly how. > > thanks. >


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