Help using Base SAS procedures

Basic question, plot and symbols

Reply
N/A
Posts: 0

Basic question, plot and symbols

Hi!

I have a basic question I hope someone can help me with. I want to create a plot where symbols equal another variable (an ID variable). Thanks on beforehand!

(I've tried to search the forum for an answer, but I couldn't find one. I hope I didn't miss any thread.)

Best regards,
Helen
Super Contributor
Posts: 281

Re: Basic question, plot and symbols

Posted in reply to deleted_user
plot y*x=symbolvar;
N/A
Posts: 0

Re: Basic question, plot and symbols

Posted in reply to deleted_user
Thanks - I would like to have the first four letters as symbol and only manages to get the first one.
Valued Guide
Posts: 634

Re: Basic question, plot and symbols

Posted in reply to deleted_user
Here is a simplistic solution using ANNOTATE. There are a number of possible refinements depending on your needs.

[pre]
data anndat(keep=xsys ysys x y function text position);
set sashelp.class(rename=(name=text));
retain xsys ysys '2' function 'label' position '2';

x=weight; y=height; output anndat;
run;

symbol1 v=dot color=blue;
proc gplot data=sashelp.class anno=anndat;
plot height * Weight;
run;
quit;
[/pre]
Super Contributor
Posts: 281

Re: Basic question, plot and symbols

Posted in reply to deleted_user
HelenSAS: are you talking about PROC GPLOT or PROC PLOT?
N/A
Posts: 0

Re: Basic question, plot and symbols

Thanks for your kind help!

I am trying to use Proc plot.

At the moment I just written

plot x*y=varname;

but would like to get the whole varname or at least 4 letters as symbol instead of just the first one.

Thanks for the code given! I am a little unsure as to how to use it, though. *sigh* I haven't tried to use plot before.
Super Contributor
Posts: 281

Re: Basic question, plot and symbols

Posted in reply to deleted_user
N/A
Posts: 0

Re: Basic question, plot and symbols

Thanks! Found it: plot x*y $ labelvar;

Can't get only 4 letters but at the moment I'm happy as it is.
Ask a Question
Discussion stats
  • 7 replies
  • 143 views
  • 0 likes
  • 3 in conversation