BookmarkSubscribeRSS Feed
GraphGuy
Meteorite | Level 14

What do you get when you run the following?...

goptions device=png;

axis1 label=(angle=90 font="albany amt" 'Here is a mu character:  '

font="albany amt/unicode" '03bc'x font="albany amt" '  ' font="albany amt/unicode" '006d'x);

axis2 offset=(15,15);

symbol1 value=circle interpol=boxcti;

proc gplot data=sashelp.class;

plot height*sex / vaxis=axis1 haxis=axis2;

run;

Ken_oy
Fluorite | Level 6

,  here it is. you can see the "mu m' is in the middle of the v-axis

out1.png

GraphGuy
Meteorite | Level 14

Yep - it seems that maybe you've got an older version of SAS that had some quirks with angled y-axis text labels ... several small spacing issues were fixed in both 9.2 and 9.3.  I would definitely recommend upgrading to 9.3 if possible!

In the meantime, perhaps one work-around is to not rotate the y-axis label.  With such a short label, it would fit just as well non-rotated (and would be easier to read non-rotated). **This is the work-around I would recommend.

Another possible work-around might be to annotate the text for the y-axis label (if you really want it rotated).  In the worst-case, you could annotate each character separately, and put them anywhere you want.

Ken_oy
Fluorite | Level 6

Yes, I agree. Using annotate we can do what ever we want in gplot. But the only problem is efficiency. Anyway, I am getting my 9.3 at the end of this month. I already learned about its improvement. Looking forward to having it :smileygrin:. Thanks for the advice again!

GraphGuy
Meteorite | Level 14

And, as ballardw mentioned, you could try the SAS/Graph 'greek' software font.  The character won't be smooth/anti-aliased, but it's easier to get the spacing right with the software fonts:

goptions device=png;

axis1 label=(angle=90 font=swiss 'Here is a mu character:  '

font=greek 'm' font=swiss '  m');

axis2 offset=(15,15);

symbol1 value=circle interpol=boxcti;

proc gplot data=sashelp.class;

plot height*sex / vaxis=axis1 haxis=axis2;

run;

All the characters in the SAS/Graph 'greek' software font can be found in a table on the following page:

http://support.sas.com/documentation/cdl/en/graphref/63022/HTML/default/viewer.htm#font-font-lists.h...

Ken_oy
Fluorite | Level 6

Yes, this code worked, amazing!! :smileylaugh:

Just to be a little picky, different fonts in one label do not look as natural as if fonts are same. I still prefer to use the code you and danH provided at the first time. I will wait for my 9.3 :smileygrin:, Thanks guys, very helpful!!!

The left one is from the geek/swiss fonts combined (in this way, we can use a lot of special symbols); the right pic is from the "latin1-supplement" code (in this way we can have very limited symbol options)

out1.png out1.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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
  • 20 replies
  • 4770 views
  • 4 likes
  • 4 in conversation