Skip to content

ctree (party) changing font sizes in plots

2 messages · Sam Thomas, Achim Zeileis

#
On Fri, 20 Nov 2009, Sam Thomas wrote:

            
Currently, this is not implemented in "party". In interactive usage it is 
not easy to change the fontsize. If you're printing to PDF, you could 
easily increase/decrease the height and width which will decrease/increase 
the relative size of the text, respectively. Not elegant but works.

Alternatively, you could obtain the "partykit" package from R-Forge which 
has a new implementation of general infrastructure for tree. With that you 
can do

library("partykit")
irisct <- ctree(Species ~ ., data = iris)
plot(irisct, gp = gpar(fontsize = 20))

Note that "party" and "partykit" should not be used together, partykit has 
a slightly enhanced/modified ctree() function.

hth,
Z