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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1905 views
  • 0 likes
  • 3 in conversation