turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Basic question, plot and symbols

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2010 07:10 AM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2010 01:58 PM

plot y*x=symbolvar;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2010 03:15 PM

Thanks - I would like to have the first four letters as symbol and only manages to get the first one.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-13-2010 08:40 PM

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]

[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]

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-14-2010 09:37 AM

HelenSAS: are you talking about PROC GPLOT or PROC PLOT?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-14-2010 10:03 AM

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.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-14-2010 11:17 AM

There are plenty of examples as support.sas.com.

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en...

http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#/documentation/cdl/en...

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

07-15-2010 04:47 AM

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

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

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