Data visualization with SAS programming

Goptions Title 2 and Title3 Text

Accepted Solution Solved
Reply
Super Contributor
Posts: 443
Accepted Solution

Goptions Title 2 and Title3 Text

In SAS 9.2 Is there a way to set the size of gchart title2 and title3 to font 10 when I have used goptions like the below? 

The problem I am running into is that the htext=8pt I am using to make the graph text 8pt make the second title 8pt as well.

goptions reset=all hsize=3in vsize=3in htext=8pt htitle=10pt;


Accepted Solutions
Solution
‎08-21-2015 01:21 PM
Respected Advisor
Posts: 3,768

Re: Goptions Title 2 and Title3 Text

Doesn't the option need to come before the quoted string.  You can change the height.  Title h=10pt 'Ten' h=12pt 'Twelve';

View solution in original post


All Replies
Grand Advisor
Posts: 9,703

Re: Goptions Title 2 and Title3 Text

Have you tried options in the Title statement:

Title2 height=6pt "Title 2 text";

Super Contributor
Posts: 443

Re: Goptions Title 2 and Title3 Text

title1 "Admissions";

title2 "Incomming Class" height=10pt;

title3 "by gender" height=10pt;

but no luck I think goptions is overriding it.

Solution
‎08-21-2015 01:21 PM
Respected Advisor
Posts: 3,768

Re: Goptions Title 2 and Title3 Text

Doesn't the option need to come before the quoted string.  You can change the height.  Title h=10pt 'Ten' h=12pt 'Twelve';

Super Contributor
Posts: 443

Re: Goptions Title 2 and Title3 Text

data_null_,

Thanks for your answer, it solved my need.  Why does the order matter, that is weird.

Grand Advisor
Posts: 9,703

Re: Goptions Title 2 and Title3 Text

It's very logical if you think of it as processing from left to right. If there is no option specifically set then the default size, font, color, angle, rotation and what have you are the default. When you override the default it stays set for the remainder of that instruction until changed.

Consider this title

Title3 height=10pt color=red "This starts the title" height= 6pt "change height" color=blue " and now change color";

Grand Advisor
Posts: 9,703

Re: Goptions Title 2 and Title3 Text

Just like the most of the text, the modifiers come first, ODS Text, Axis tick labels, legend labels and values and many other examples of text modifiers.

Post a Question
Discussion Stats
  • 6 replies
  • 428 views
  • 6 likes
  • 3 in conversation