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

Hi I was wondering if there is a way to remove a page title and keep graph titles in SAS when I create a PDF file containing several graphs.

I tried several different no title options in SAS, but they did not work..

If you run below code, you'll get a title of "title 4" in the second page and then you also get "title 4" for the graph itself.

I want to remove this page title or at least separately specify a page title from the graph titles.

Additionally, I know that I could use inset statement to avoid this problem, but I was wondering if we can separately specify page/graph titles or remove page titles all together..

data mydata;

    var1=1;

    var2=2;

run;

%macro pic;

%do i=1 %to 6;

proc sgplot data=mydata;

    title "Title &i";

    vbar var1 / response=var2;

run;

%end;

%mend;

ods pdf file = "C:\temp\test.pdf"

STARTPAGE=NEVER style=SASweb;

ods noproctitle;

%pic;

ods pdf close;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The ODS PDF option GTITLE may be what you are looking for. The titles in effect when a graph is created are placed in the graph area not the body. ODS PDF GTITLE File= "   " etc.

A general comment: clear the titles at the end of a procedure unless you KNOW that you want them still active.

I almost always have "run;title; " at the end of most procs.

View solution in original post

2 REPLIES 2
ballardw
Super User

The ODS PDF option GTITLE may be what you are looking for. The titles in effect when a graph is created are placed in the graph area not the body. ODS PDF GTITLE File= "   " etc.

A general comment: clear the titles at the end of a procedure unless you KNOW that you want them still active.

I almost always have "run;title; " at the end of most procs.

blue_lion
Calcite | Level 5

Hi ballardw, thanks for your response! I did not think of redefining blank title after every Run statement. That's a good idea and thanks again for your help!!

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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