[R-gui] After resizing a tkwidget, how do I get the size of the widget??

Carlos Rendon crendon at gmail.com
Thu Sep 29 00:40:26 CEST 2005


This should help a little bit:

jpeg(fileName)
someFunctionThatDrawsTheGraph()
dev.off()

you can also use:

fileName<-tclvalue(tkgetSaveFile(initialfile=".jpg",filetypes="{{JPEG
File} {.jpeg .jpg}}"))

to get the name of the file to save.

On 9/28/05, Søren Højsgaard <Soren.Hojsgaard at agrsci.dk> wrote:
> Dear all,
> I am trying make a small tcltk thing for drawing graphs with vertices, edges etc. I can draw the graph in a window.
>
> - I would like it so that if I resize the window, the graph will also be resized. To do this, I guess I need the size of the window, so that I can calculate the new coordinates.
> - I would also like to be able to save the graph as e.g. a jpg/ps file.
> Can anyone help on this?
>
> I find the documentation of the tcltk package difficult to comprehend so I have used the examples on http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/. Can anyone point me to other sources of examples/doc of the tcltk package?
> Thanks in advance
> Søren
>
> _______________________________________________
> R-SIG-GUI mailing list
> R-SIG-GUI at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-gui
>


--
Carlos Rendon



More information about the R-SIG-GUI mailing list