0

I have a gWdigets GUI making a plot embedded in a ggraphics container. When I right-click on the plot, a menu "copy - save" appears, but when I save the file everything seems to work correctly but at the end there's no saved file.

Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
  • The functionality is missing from `gWidgets2RGtk2` and right now there is only a stub. (which should have signaled a message, but perhaps I turned those off.) The code from `gWidgetsRGtk2` has issues now and I need to find a better way. For now, I can only suggest caching the drawing commands within the GUI and using those to write to a non-interactive device, such as `png`. – jverzani Dec 09 '13 at 15:51
  • Ok @jverzani. I will try to use `savePlot()` after getting the current device with `dev.cur()` (please stop me if it won't work) – Stéphane Laurent Dec 09 '13 at 17:15
  • I don't think that will work, but it would be good to be surprised. – jverzani Dec 09 '13 at 18:06
  • @jverzani `Error in savePlot() : can only copy from 'windows' devices` – Stéphane Laurent Dec 09 '13 at 18:45
  • @jverzani `dev.copy2pdf()` is very nice cause it respects the current width and height (my graphic is in a `gnotebook` and the user can play with the width and the height). With `dev.copy(png); dev.off()` one has to specify the width and the height. Please do you know how to get the current width and height ? – Stéphane Laurent Dec 09 '13 at 18:53
  • @jverzani Sorry, I should find the answer myselfy in the code of `dev.copy2pdf`, logically. – Stéphane Laurent Dec 09 '13 at 23:18

0 Answers0