Data visualization with SAS programming

Getting title in SGPLOT centered over the whole graph area and not only the data area

Reply
New Contributor
Posts: 3

Getting title in SGPLOT centered over the whole graph area and not only the data area

I am running SAS 9.3 and try to get the title centered.

I have very large formatted values on the y-axis, so the data area is very small on the right side.

If I use

title j=c "titletext"

 

it does not happen. Title is only centered above the graph box.

 

If I use

title j=l "titletext"

the title appears left bound.

 

 

Thanks for your help,

Carol

SAS Super FREQ
Posts: 925

Re: Getting title in SGPLOT centered over the whole graph area and not only the data area

Starting in SAS 9.4, "j=c" gives you what you want.

 

title "titletext";  --- centers over the data area

title j=c "titletext";  --- centers in the graph

New Contributor
Posts: 3

Re: Getting title in SGPLOT centered over the whole graph area and not only the data area

Dear Dan!

Thank you for this quick answer. But is there any way do to it in SAS 9.3?

 

 

New Contributor
Posts: 3

Re: Getting title in SGPLOT centered over the whole graph area and not only the data area

I just found out how to center the title over graph area: if it is too long to fit over the data area it will suddenly be centered over the graph area... so adding blanks can help forcing this centering.

Ask a Question
Discussion stats
  • 3 replies
  • 152 views
  • 0 likes
  • 2 in conversation