Skip to content

Need formatting help - ctree - plot.party - node_hist

2 messages · Warren W. Kretzschmar, Carlos Ortega

#
Hi,
I am trying to get the terminal nodes of a plot of a ctree object to look nice.

Using the iris data I have:

library(party)
mtree <- ctree(Species ~ ., data=iris)
plot(mtree,terminal_panel=node_barplot(mtree))

The terminal nodes don't display the species names because the names
are displayed horizontally. ?I would like to reduce the size of the
labels and make the terminal nodes horizontal barplots or rotate the
labels by 90 degrees, but I don't know how to do this. ?Any help is
appreciated.

Warren