partykit ctree格式化x和y轴标签 [英] partykit ctree formating x and y axis labels

查看:103
本文介绍了partykit ctree格式化x和y轴标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是partykit软件包的最新版本似乎从ctree图中删除了所有x和y轴标记和标签.

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)

请参阅...终端节点中没有x或y标签!

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)

从我看到的在线partykit来看,应该能够重新创建所有派对图以及更多内容.希望这个问题的答案很简单,因为我确实需要利用我为partykit看到的一些格式化功能!

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!

谢谢!

推荐答案

答案很简单:这是我在为绘图区域启用裁剪时引入的一个错误.在某些情况下,这还会剪切轴标签. partykit软件包的1.0-4版解决了该问题,并且已经在CRAN主服务器上的 http:上提供了://CRAN.R-project.org/package=partykit .

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.

这篇关于partykit ctree格式化x和y轴标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆