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??
That is the correct syntax.
title height=20pt "Title";
proc sgplot data=sashelp.class;
vbar age;
run;
Also check out Customizing Titles and Footnotes
Thanks for your reply. This method doesnt seem to work.
Title height= 20pt 'type in my title';
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
@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.
Thanks for your reply, am using SAS 9.4 and the title is within a macro
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.