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

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.

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