BookmarkSubscribeRSS Feed
Anita_n
Pyrite | Level 9

How do I change the size of my title in sgplot. I haves used title height=12pt  "type in my title";

but it doesn't work

Any idea??

7 REPLIES 7
Jay54
Meteorite | Level 14

That is the correct syntax.

 

title height=20pt "Title";
proc sgplot data=sashelp.class;
  vbar age;
run;
Anita_n
Pyrite | Level 9

Thanks for your reply. This method doesnt seem to work.

Title height= 20pt 'type in my title';

 

BrunoMueller
SAS Super FREQ

Find below a code sample using a TITLE statement that changes the height as well as the color of the title.

title height=20pt color=red 'type in my title';
proc sgplot data=sashelp.cars;
  vbar type / group=origin;
run;

Please provide some more information like:

Are you running your code using SAS Enterprise Guide, SAS Studio or something else?

Which ODS destination are you using?

Is the title within the image or outside the image created by SGPLOT

ballardw
Super User

@Anita_n wrote:

Thanks for your reply. This method doesnt seem to work.

Title height= 20pt 'type in my title';

 


Doesn't work is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of a dataset, the actual results and the expected results. Data should be in the form of a data step. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

 

Which ODS destination are you sending the result to? Please post the exact code you are using as other options on the ODS destination or ODS Graphics statement have impact the results.

 

Post code in a code box opened with the forum {I} menu icon.

Anita_n
Pyrite | Level 9

Thanks for your reply, am using SAS 9.4 and the title is within a macro

BrunoMueller
SAS Super FREQ

Just run the code sample provided without any macro around it, do you get the desired result?

 

Maybe your macro is resetting the TITLE definition.

 

Also provide the answers to the three questions above.

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
  • 7 replies
  • 15977 views
  • 2 likes
  • 5 in conversation