partykit ctree formating x and y axis labels

二次信任 提交于 2019-12-10 11:41:56

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!