BookmarkSubscribeRSS Feed
Emily_Zhang
Fluorite | Level 6

when I use the gplot with anno, there is warning in log as follows:

Font ALBANY A could not be used.
Font Albany AMT substituted for font ALBANY A.

 

But I define the style='ALBANY AMT' in the anno dataset, why it is truncated and cannot distinguished?  If I replace the "ALBANY AMT" with "Duplex", it can work without warning, but it is not what I want. I want the annotation dataset with "Arial" font. How can I deal with it? Thanks.

Program to produce anno:

Capture.PNG

Log:

Capture.PNG

6 REPLIES 6
Jagadishkatam
Amethyst | Level 16
Please increase the length of the style variable in anno dataset. For the same please mention the style in length statement so that it will get a length of 200 and there wont be any truncation and the corresponding warning will be removed.
Thanks,
Jag
Emily_Zhang
Fluorite | Level 6

Dear Jag, Thanks for your reply. I have tried, but found that in anno dataset, the style is right. But when use proc gplot it still cannot be distinguished. I also found that the proc gplot may only distinguish the "Software Fonts"(like Duplex) other than "TrueType Fonts"(like Albany AMT).

Jagadishkatam
Amethyst | Level 16

ok but i believe it will still work, the only change that we could try now is keep the 'Albany AMT' in quotes in the style variable.

like below

 

style=" 'Alanby AMT' ";

 

could you please try this

Thanks,
Jag
Emily_Zhang
Fluorite | Level 6

Yeah, I have tried, but still same warning in log.

Emily_Zhang
Fluorite | Level 6

Hi Jag, thanks for your kind help. The problem has been solved. I remove the style= from anno dataset. And add the following options:

GOPTIONS FTEXT='Albany AMT'; And it does work without any warning. I don't figure it out why the fommer one can't work, but anyway, the latter one does work. Thanks a lot !

ballardw
Super User

Annotate data sets with the device procedures such as GPLOT are somewhat picky as to the NAMES of variables for the specific elements. SAS supplies a number of annotate related macros to help with generating appropriate annotate values. Look at the documentation for %Annomac  and the related macros it activates.

 

BUT the most likely cause of your issuw was not setting the LENGTH characteristic long enough to contain the desired text.

If your data set FINAL happened to have a variable named style and the length was 8 characters then when you use: Style='Albany AMT'; the value gets truncated because the previously declared length will only hold "Albany A"

So try

 

data anno;

    length style $ 20;

    set final;

 

etc. to set the length for the STYLE variable before reading in the data set FINAL.

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