BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
7 REPLIES 7
Paige
Quartz | Level 8
plot y*x=symbolvar;
deleted_user
Not applicable
Thanks - I would like to have the first four letters as symbol and only manages to get the first one.
ArtC
Rhodochrosite | Level 12
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]
Paige
Quartz | Level 8
HelenSAS: are you talking about PROC GPLOT or PROC PLOT?
deleted_user
Not applicable
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.
deleted_user
Not applicable
Thanks! Found it: plot x*y $ labelvar;

Can't get only 4 letters but at the moment I'm happy as it is.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 1144 views
  • 0 likes
  • 3 in conversation