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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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