BookmarkSubscribeRSS Feed
Foxer
Fluorite | Level 6


I recently upgraded to SAS 9.4 and re-ran a proc gplot code to adjust label text, and I noticed that my output GIF plot had very small font sizes compared to the original plot run on SAS 9.3.

 

To get the plots looking consistent, I had to increase the size of my original label text from h=1.7 (on SAS 9.3) to h=2.6 on SAS 9.4.

Does anyone know if this is a known problem with the latest SAS upgrade or why they would be that inconsistent? Is there some sort of setting or preference that can be selected?

 

Example below. The same proc gplot code was run on SAS 9.4 (top figure) and SAS 9.3 (bottom figure). Notice how small the labels and symbols are in the top figure (9.4) as well as the width of the plot being a little wider compared to the 9.3 figure:9.4 Bad.jpg9.3 Good.jpg

 

5 REPLIES 5
ballardw
Super User

My first guess would be that you did not have any font explicitly used in the Axis statement for the labels. When you upgraded the default ODS style used by SAS changed and therefore the font, or possibly if you are setting a style the inheritance may have changed fonts on you.

Try setting an explicit font and size in the Axis statements.

Foxer
Fluorite | Level 6

I do not use a specific styling and I specify the font and height. 

 

Here are my GOPTIONS:

 

GOPTIONS RESET=ALL;
GOPTIONS DEVICE=GIF FTEXT="ARIAL" XPIXELS=1600 YPIXELS=1200
GACCESS=SASGASTD GSFNAME=GRAFOUT GSFMODE=REPLACE ROTATE=LANDSCAPE; 
FILENAME GRAFOUT "&OUTPUT.\GIF_PLOT.GIF";

Here is the beginning of my AXIS1 statement (also used in AXIS2):

AXIS1 LABEL=(F=ARIAL H=2
ballardw
Super User

I think you need to investigate which ODS styles were in effect as some of the graphics options are going to interact with graphic output. Your text height is defined in character cells since you do not have a unit of measure. With the overall graph size differing, for whatever reason, then the cell size likely differs as well causing text size differences. You might want to specify an explicit measurement unit like IN, CM or PT.

 

Defining graph sizes in pixels may also be causing issues for some uses as pixel size varies from device to device and if the output is routed to PDF or RTF then it may be more of an issue. I know I had some issues transition to SAS 9 from 8 with pixel defined areas. I would investigate using VSIZE and HSIZE and set explicit measure of IN, CM or PT. I would recommend use of IN or CM which ever you think in better.

GraphGuy
Meteorite | Level 14

I usually specify gunit=pct (graphical size units are specified as a percent of the page height) - otherwise the sizes can be a bit vague, and depend on the context and other settings that might or might not be in effect at the time. Or sometimes I explicitly specify a size unit when I specify a height (such as ...  title1 height=10pt "Some text";)

 

Here is an example showing how I usually set my goptions:

 

goptions gunit=pct htitle=4.3 htext=2.2 ftitle='albany amt/bold' ftext='albany amt';

 

RickPack
Fluorite | Level 6

Post-submission edit: The defaults are the same. Only their sequencing is different. I have still not solved the sizing problem.

 

I am currently experiencing this problem and noticed differences between the SAS 9.3 and SAS 9.4 ODS default style templates. You can see your defaults using:

PROC TEMPLATE;
SOURCE STYLES.DEFAULT /
FILE='C:\DefaultStyle.sas';
RUN;

 

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!

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
  • 5 replies
  • 2428 views
  • 1 like
  • 4 in conversation