The SAS Output Delivery System and reporting techniques

Enlarging legend font and size in proc lifetest plot

Reply
Contributor lei
Contributor
Posts: 37

Enlarging legend font and size in proc lifetest plot

i used macro here in order to customize the size of the fonts of the graph.

http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_templt_a0000...

 

However, I cannot get the legend of the proc lifetest plot to be larger. I need it for a poster and to be at least 25 pts. Is there anyone that can help.

 

Thanks

 

Shirley 

Trusted Advisor
Posts: 1,116

Re: Enlarging legend font and size in proc lifetest plot

Hello Shirley,

 

I'm not familiar with the Graph Template Language, but looking at the macro code I think the DISCRETELEGEND statements are the places where to specify font sizes (and other text attributes) for the corresponding legends.

 

According to the documentation you can specify text attributes for the legend title and legend values separately. The respective options are named TITLEATTRS= and VALUEATTRS= and they go after the slash in the DISCRETELEGEND statement, where you see already other options such as LOCATION=. Their values can take different forms. One example is:

valueattrs=(size=25 pt)

(and similarly for TITLEATTRS). Please see the documentation for more details.

Contributor lei
Contributor
Posts: 37

Re: Enlarging legend font and size in proc lifetest plot

Hi thank you so much that worked perfectly? Another quick question. Is there a way of thinkening the lines in the legend and on the graph?

 

Sorry to bug you.

Trusted Advisor
Posts: 1,116

Re: Enlarging legend font and size in proc lifetest plot

I guess that the line thickness should ideally be specified in some style definition (which I'm not familiar with). But, according to the documentation of the STEPPLOT statement, it should also be possible to specify something like

lineattrs=(thickness=3 pt)

in the options of that statement (again, after the slash), which occurs in the SingleStratum and MultipleStrata macros.

 

The above will probably not affect the line thickness in the legend. For this, you could try the option

autoitemsize=true

which needs to be added to the DISCRETELEGEND statement. If this doesn't have the desired effect, I would look into the LEGENDITEM statement

Ask a Question
Discussion stats
  • 3 replies
  • 418 views
  • 1 like
  • 2 in conversation