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

I have a dashboard that generates PDF out using ODS absolute.

 

It was developed and runs fine in EG 7.15 (7.100.5.5850) (64-bit) (SAS version: 9.04.01M3P062415)

 

However, in EG 8.1  (8.1.0.4552) (32-bit)  (SAS version: 9.04.01M6P110718)

the bar charts generated with SGplot are not scaling the same as in the former EG version.

 

The text is getting squished and do not fit the same way in the ODS region that worked before.

 

Is it possible to export the template that is used in EG 7.15 and apply it to the current version and how would I export it?

ods graphics on / noborder height=7.0cm width=9.750cm antialiasmax=1400  scale=on ;

The above is the ods graphics line.  Each of the 4 graphs specify their respective ods region, eg the first one:

ods region x=0.05cm width=9.50cm  y=17.525cm height=6.5cm;

Thanks for any leads you can provide.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

ods graphics on / noborder height=7.0cm width=9.750cm antialiasmax=1400  scale=on ;

The above is the ods graphics line.  Each of the 4 graphs specify their respective ods region, eg the first one:

ods region x=0.05cm width=9.50cm  y=17.525cm height=6.5cm;

Thanks for any leads you can provide.

 


If those are your actual settings in one program it appears from the ODS graphics you a creating graphs that are 9.75cm wide and then forcing them to fit into 9.45cm (9.5 - 0.05cm) in the region. Maybe adjust the ODS graphics to be in line with the space you are allocating in the region layout? Or try the Scale=off option.

 

It may be that the later EG version "fixed" a scale collision if you are using the exact same code.

 

Also the ODS styles may have changed a bit somewhere between the two releases. I know I ran into that between SAS 9.2 and 9.3. Fonts being one of the major bits of the styles some change there might have an impact on appearance.

View solution in original post

3 REPLIES 3
ballardw
Super User

ods graphics on / noborder height=7.0cm width=9.750cm antialiasmax=1400  scale=on ;

The above is the ods graphics line.  Each of the 4 graphs specify their respective ods region, eg the first one:

ods region x=0.05cm width=9.50cm  y=17.525cm height=6.5cm;

Thanks for any leads you can provide.

 


If those are your actual settings in one program it appears from the ODS graphics you a creating graphs that are 9.75cm wide and then forcing them to fit into 9.45cm (9.5 - 0.05cm) in the region. Maybe adjust the ODS graphics to be in line with the space you are allocating in the region layout? Or try the Scale=off option.

 

It may be that the later EG version "fixed" a scale collision if you are using the exact same code.

 

Also the ODS styles may have changed a bit somewhere between the two releases. I know I ran into that between SAS 9.2 and 9.3. Fonts being one of the major bits of the styles some change there might have an impact on appearance.

ghosh
Barite | Level 11

Good catch, let me try your suggestion when I get back on to my work computer.

 

I think I have the ods region and ods graphics dimensions reversed when I typed them out in my post (they are read from a table into macro vars).  Yes, I did try with scale off

 

Still looking for code to save the template used by sgplot

 

Thanks

ghosh
Barite | Level 11

Thank you for pointing that out,  the values of the ods graph and region were getting swapped, I guess EG 7 is more forgiving.

 

However, text spacing problem still exists, including the title and the value labels, guess I will make it a new post, after I try to figure it out. 

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