Vim-R-plugin
Vim-R-plugin copied to clipboard
have many plot displayed at the same time
Is it possible to have many plot displayed at the same time? Like an option to always have a new window that open every time you do plot(...)
Thanks, awesome plugin.
I found that I can use:
dev.new()
between 2 plot to open a new window.
Many different commands might result in plots, and I don't know how to detect that there will be a plot. If I knew, I could make the nvimcom package automatically call dev.new()
before each plot. Perhaps, what you want is a new option for X11.options()
, but, then, you should make your request to the R Core Team. I think RStudio does what you want, but it has its own plotting device, and I am not going to write one.
Of course. I am good with the dev.new() technique for now. I have been using Vim-R-plugin for few days and it is awesome. Thanks.
Perhaps another option is a kind of yank ring for plots, with mappings for recordPlot and replayPlot to save and replay plots, storing them in a list object within the vimcom namespace.
I could implement support for recordPlot()
and replayPlot()
. It would be easy to add a key binding to manually call recordPlot()
, but I still don't know how to detect when a plot was finished and, thus, when recordPlot()
should be automatically called.
I think the best solution would be to have native X11, Quartz and Windows support for this feature. The user would put in the ~/.Rprofile
:
grDevices::X11.options(record = TRUE)
Then, when the focus was on the graphical device window, the Left and Right arrow keys could be used to replay the plots.