问题
My problem is the newest version of the partykit package seems to remove all x and y axis tics and labels from ctree plots.
install.package("partykit")
library(partykit)
irisct <- ctree(Species ~ .,data = iris)
plot(irisct)
See ... no x or y labels in the terminal nodes!
I want the plots to look like they do in the party package:
detach("package:partykit", unload=TRUE)
library(party)
irisct <- ctree(Species ~ .,data = iris)
plot(irisct)
From what I have seen online partykit should be able to recreate all party plots and more. Hopefully the answer to this question is easy, because I do need to take advantage of some of the formatting features I have seen described for partykit!
Thanks!
回答1:
The answer is simple: It was a bug that I introduced when enabling clipping for the plotting regions. And in some circumstances this also clipped the axes labels. Version 1.0-4 of the partykit package fixes the problem and is already available on the CRAN master server at http://CRAN.R-project.org/package=partykit.
来源:https://stackoverflow.com/questions/32834052/partykit-ctree-formating-x-and-y-axis-labels