BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
David5
Fluorite | Level 6

First off, I'm very new to SAS, and I've inherited a large program that creates all sorts of wonderful graphs. We upgraded to SAS 9.4 and now all the graphs are blurry (there are lots of other issues with this program, but let's take it one at a time).

 

The program uses ODS to output to HTML, with the setup looking like this:

 

ods graphics on / 
	reset		= all
	imagename 	= 'img1' 
	imagemap	= on ; 

ods listing close; * Close default output destination;

ods tagsets.msoffice2k_x 
	path	= "&path" 
	file	= "graph.html" 	/* Destination file for output*/
	gpath	= "&path\GRAPHS" 	/* Location for graphic output*/
	style	= statistical 				/* ODS Style template */
   	options ( panelcols="1" /* Number of columns in sheet */ 
			);

Note that although it is exported to HTML, the final dsestination is an Excel spread sheet (there is a later step that combines a bunch of documents into one excel book).

 

There is then lots of other code but I believe the step that actually outputs is the proc sgplot step, which appears to have nothing that changes formatting.

 

Basically, from what I can tell, it's using the "statistical" style without any changes.

 

The output is a vertical bar chart with the number for each bar being shown above the bar in small text (see attached image - zipped because PNG isn't an allowed format...). From searching on Google I have found that I can change the template, and I believe I need to be changing the GraphDataFont property. I have tested the other similar properties that affect the font and found that when I change them, I see a change in the graph. But when I change GraphDataFont, it does not change at all. Whether I set it to 1, 10, or 100, it looks exactly the same. Changing the other similar properties affects other areas but none that I could find affect this text.

 

Can anyone suggest what I could try to boost the size of this text? I set image_dpi on the ODS output to get the rest of the graphs larger but this text above each bar stays small and blurry. I have tried switching to using ODS EXCEL but this did not help.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DanH_sas
SAS Super FREQ

The simplest solution is for you to use the DATALABELATTRS option on the VBAR statement (I assume that's the one you used). For example:

 

vbar cater / response=respvar data label datalabelattrs=(size=9pt);

 

Give that a try and let us know if that works for you.

 

Thanks!

Dan

View solution in original post

2 REPLIES 2
DanH_sas
SAS Super FREQ

The simplest solution is for you to use the DATALABELATTRS option on the VBAR statement (I assume that's the one you used). For example:

 

vbar cater / response=respvar data label datalabelattrs=(size=9pt);

 

Give that a try and let us know if that works for you.

 

Thanks!

Dan

David5
Fluorite | Level 6
That worked like a treat, thank you so much!

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
  • 2 replies
  • 729 views
  • 0 likes
  • 2 in conversation