httpgd
httpgd copied to clipboard
Open plots in external browser by default
I find httpgd
really enjoyable to use in VS Code and in my dual-monitor setup, I often open the plot viewer externally in a browser, close the plot viewer in VS code, and have my plots updating on my second monitor as I tweak my graphing code on my first monitor.
The issue with this is when I re-run my updated plotting code the plot viewer window re-opens in VS code. Is there any way to prevent httpgd
from re-opening the VS Code plot viewer and to only update the external browser?
A setting to choose where or how httpgd
shows plots by default may be helpful. From this post by @renkun-ken, I found the following .Rprofile code and tried to update the viewer
argument to External
or Browser
but to no avail.
if (interactive() && Sys.getenv("TERM_PROGRAM") == "vscode") {
if ("httpgd" %in% .packages(all.available = TRUE)) {
options(vsc.plot = FALSE)
options(device = function(...) {
httpgd::hgd(silent = TRUE)
.vsc.browser(httpgd::hgd_url(), viewer = "Beside")
})
}
}