我可以将 cranvas 交互式图形嵌入到 R 中的 gWidgets (gWidgetsQt) 中吗

发布于 2024-11-24 01:41:40 字数 424 浏览 1 评论 0原文

我想知道是否有一种方法可以在 gWidgets GUI 中嵌入 cranvas 交互式绘图使用 R.cranvas 需要 qtpaint 和 qtbase,因此工具包可能是 gWidgetsQt。

有人告诉我 PlotView 是一个 qWidget,因此应该可以添加一个新的 gWidget,例如包装 cranvas 图的 ginteractive。

请参阅此 Google 网上论坛帖子。如果您需要更多信息,请询问,但我不是 cranvas 的维护者。

I would like to know if there is a way to embed a cranvas interactive plot within a gWidgets GUI when using R. cranvas requires qtpaint and qtbase so the toolkit would probably be gWidgetsQt.

I was told that PlotView is a qWidget and so it should be possible to add a new gWidget e.g., ginteractive that wraps a cranvas plot.

See this Google Groups thread. If you need more info just ask, I am not a maintainer of cranvas though.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遮云壑 2024-12-01 01:41:40

它需要对 gWidgetsQt 进行轻微更改(现在在 r-forge 上),但现在可以直接使用 ggroup 对象的 add 方法。这里我嵌入了 qtime 手册页中的一个示例:

g <- ggroup(cont=gwindow())
require(cranvas)
data(nasa)
nasa11 <- subset(nasa, Gridx == 1 & Gridy == 1)
qnasa <- qdata(nasa11)
selected(qnasa)[1] <- TRUE
cobj <- qtime(qnasa, TimeIndx, ts)

add(g, cobj)

如果您在 gWidgetsQt 中发现错误,请以我的方式分享。包还是新的。

It required a slight change to gWidgetsQt (on r-forge now), but is now straightforward using the add method of a ggroup object. Here I embed an example from the qtime man page:

g <- ggroup(cont=gwindow())
require(cranvas)
data(nasa)
nasa11 <- subset(nasa, Gridx == 1 & Gridy == 1)
qnasa <- qdata(nasa11)
selected(qnasa)[1] <- TRUE
cobj <- qtime(qnasa, TimeIndx, ts)

add(g, cobj)

Please, if you find bugs in gWidgetsQt, share them my way. The package is still new.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文