gWidgets:点未出现在第二个屏幕中 [英] gWidgets: points are not appearing in second screen

查看:129
本文介绍了gWidgets:点未出现在第二个屏幕中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在R中使用gWidgets.我希望在拆分屏幕后可以同时显示两个图.我不知道为什么第二个屏幕上没有数据点.

I am using gWidgets in R. I would like two plots to appear side by side after I split the screen. I cannot figure out why no data points appear in the second screen.

library(gWidgets)
win <- gwindow("Graphics example")  # Create a window.
# You will be prompted to select a GUI toolkit.
# Enter "1" for gWidgetsRGtk2
ggraphics(ps=6, container=win)
split.screen(c(1,2))  # Split screen into 2 halves
screen(1)
plot(c(1:10), rnorm(10))
screen(2)
plot(c(1:10), rnorm(10))

您应该看到出现了第二个图,但是它不包含任何数据点.我在32位Windows笔记本电脑上使用32位R 2.13.2.对此的任何帮助将不胜感激.谢谢.

You should see that the second plot appears but it contains no data points. I am using 32-bit R 2.13.2 on a 32-bit Windows laptop. Any help with this is much appreciated. Thank you.

推荐答案

窗口未分配足够的初始空间来容纳图形也可能是一个问题.为避免这种情况,请尝试将visible=FALSE传递给gwindow构造函数,并在添加所有组件后使用visible(win) <- TRUE

It may also be an issue with the window not allocating enough initial space to accommodate the graphic. To avoid this, try passing visible=FALSE to the gwindow constructor and after all the components are added show the window with visible(win) <- TRUE

这篇关于gWidgets:点未出现在第二个屏幕中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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