Help using Base SAS procedures

How to remove a page title and keep graph titles

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 14
Accepted Solution

How to remove a page title and keep graph titles

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;


Accepted Solutions
Solution
‎12-08-2014 01:39 PM
Super User
Posts: 11,343

Re: How to remove a page title and keep graph titles

Posted in reply to blue_lion

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


All Replies
Solution
‎12-08-2014 01:39 PM
Super User
Posts: 11,343

Re: How to remove a page title and keep graph titles

Posted in reply to blue_lion

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.

Occasional Contributor
Posts: 14

Re: How to remove a page title and keep graph titles

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!!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 1014 views
  • 0 likes
  • 2 in conversation