display image in tcltk window with R… How?

穿精又带淫゛_ 提交于 2019-12-25 05:24:39

问题


Can anyone tell me how to dislpay an image in a tcltk window ?

I found Img package here : sourceforge (1.3 version) but I can't install it manually because of missing 'DESCRIPTION' file.

How can I install it ?

-> How can I display image on a tcltk window (using Img package or not) ?

thank you

Config : Windows 7 64 bits, R 3.0.1


回答1:


You can use a label for this:

w <- tktoplevel()
tcl("image","create","photo", "imageID", file="your_image.gif")
l <- ttklabel(w, image="imageID", compound="image")
tkpack(l)

This only supports a limited number of file formats though.



来源:https://stackoverflow.com/questions/17580818/display-image-in-tcltk-window-with-r-how

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