BookmarkSubscribeRSS Feed
gm_sas
Calcite | Level 5

I can change the function to 'point' and get a tiny point in the attached code (text file), but I'm missing some critical detail to get an actual symbol of any size or type out of this.

My original intent was to set up something so that a particular and unique point from a data set gets a large, special, and unique symbol so that receipients of the graph can easy see where one particular point lies in relation to all the others.

Grateful for any suggestions.

6 REPLIES 6
gm_sas
Calcite | Level 5

data wc; input grp $ 5. height weight; datalines; east 55 125 east 60 175 west 62 175 south 55 135 north 62 195 west 50 115 ; run; goptions reset=all gunit=pct ftext='calibri' htext=2; symbol v=dot h=2; axis1 label=(a=0 "Weight") order=100 to 200 by 10; axis2 label=(angle=90 "Height") order=40 to 100 by 10; legend1; legend2; data singlepoint (keep= xsys ysys hsys function style color size x y); set wc ; xsys = '2'; ysys = '2'; hsys = '3'; function ='symbol'; style = 'marker'; color ='black'; size=10; x =100; y =50; when = 'A'; run; proc gplot data=wc anno=singlepoint; plot height*weight =grp / haxis=axis1 vaxis=axis2 legend=legend1 anno=singlepoint ; run; quit;

GraphGuy
Meteorite | Level 14

One way to annotate a 'dot' and have control over the size is to use the 'pie' function, and control the size (radius).

For example...

function='pie';

rotate=360;

style='psolid';

color='blue';

size=5;

Alternately, you can use the annotate 'label' function, and specify any font you want (via the style variable), and then use any character of that font.

ballardw
Super User

Your options might involve placing text from the MARKER font or use PROC GFONT to create a graphic font from scratch to show what you want .

The %LABEL annotate macro would be the way to use either of these.

gm_sas
Calcite | Level 5

Thanks to you both for your replies.  The pie function did not work, but the label function did, thanks!  I'm not (yet) into macros, but I'll keep that one in mind

I have noticed that in my x-setting statement, the x is in blue, while the y in the y-setting statement is in black.  Is this normal - why would SAS treat x as a key word?

ballardw
Super User

X is a key word. It is a command used to run operating system commands.

gm_sas
Calcite | Level 5

Thank you.  SAS is a great big world...

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 6 replies
  • 2064 views
  • 0 likes
  • 3 in conversation