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

If there's an answer to my question somewhere then either I'm bad at searching or didn't understand the answer.

When I use the code further down below the graph image that ends up in the rtf file doesn't follow the style I've defined (mystyle). For example, the axis values and labels don't have the same font and size.

However, the rest of the rtf file (titles and footnotes outside the graph image) does follow mystyle.

In mystyle I have defined the following to modify the graph:

style GraphFonts /
"GraphDataFont"=("Courier New",&fsz0.pt,roman)
"GraphUnicodeFont"=("Courier New",&fsz0.pt,roman)
"GraphValueFont"=("Courier New",&fsz0.pt,roman)
"GraphLabelFont"=("Courier New",&fsz0.pt,roman)
"GraphLabel2Font"=("Courier New",&fsz0.pt,roman)
"GraphFootnoteFont"=("Courier New",&fsz0.pt,roman)
"GraphTitleFont"=("Courier New",&fsz0.pt,bold)
"GraphTitle1Font"=("Courier New",&fsz0.pt,bold)
"GraphAnnoFont"=("Courier New",&fsz0.pt,roman);
;
end;

So, I'd like to know what I have to do to apply mystyle to the graph figure.

I'm using sas eg 8.3 with sas 9.4m7.

Thanks! 😃

filename filertf "[path_to_file]\figure.rtf";
options nobyline;
ods noresults;
ods results=off;
ods listing style=styles.mystyle;
option orientation=landscape missing="";
ods rtf file=filertf style=styles.mystyle nogtitle nogfootnote ;
ods noproctitle;
options nobyline;
ods graphics on / width=9in height=5.4in border=off scale=on;
goptions reset=goptions device=png target=png xmax=9in ymax=5.4in;
proc sgrender data=final template=tmp_plot;
dynamic _xlabel="Time (h)" _ylabel="Plasma Concentration (ng/mL)" ;
by continue param;
run;
ods graphics off;
ods rtf close;
ods results=on;
ods results;
ods proctitle;
options byline;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If having your style on the ODS destination statement is not applying your style then I suspect you may have an issue with the creation of the style not addressing the proper elements or the font name is incorrect as that is the base approach to having all the graphs made using a desired style.

View solution in original post

2 REPLIES 2
ballardw
Super User

If having your style on the ODS destination statement is not applying your style then I suspect you may have an issue with the creation of the style not addressing the proper elements or the font name is incorrect as that is the base approach to having all the graphs made using a desired style.

tristevoix
Fluorite | Level 6

K, yes, I see now.

Mystyle was based on the minimal style and that style doesn't have graph stuff.

Even though I added that code in mystyle it didn't seem to be acknowledge or something.

So I switched to rtf as a parent. I then had to add a few style fonts missing in mystyle, but then suddenly the graphfont is being taken into account.

 

So, thanks a lot! 😃

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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