httpgd icon indicating copy to clipboard operation
httpgd copied to clipboard

`par_old = par(no.readonly = TRUE)` triggers the plot window and makes the subsequent figure size incorrect

Open mynanshan opened this issue 1 year ago • 0 comments

Describe the bug

it may not be counted as a problem but is a little bit annoying:

  • Running par_old = par(no.readonly = TRUE) in a fresh R session calls out the httpgd plot window. This line of code is only meant for recording the default settings, not for plotting.

  • Then, whenever I plot, the chart appears with an incorrect size. (Screenshot: how the vs-code interface looks like when I hit the plot function. The white horizontal bars are the squashed white background of the plot and its thumbnail.) image

  • If now I draw the edge of the plot window with some random re-scaling, the plot will recover and appear what it should be. (Screenshots: 1) After a random re-scaling of the window, the plot appears immediately. 2) The plot does not disappear even when I re-scale the window back to its original size) image image

Environment

  • R version 4.3.1 (2023-06-16)
  • Platform: x86_64-pc-linux-gnu (64-bit)
  • Running under: Ubuntu 22.04.3 LTS
  • VsCode Version: 1.84.0; Electron: 25.9.2; ElectronBuildId: 24603566; Chromium: 114.0.5735.289; Node.js: 18.15.0; V8: 11.4.183.29-electron.0; OS: Linux x64 6.1.0-1023-oem snap

mynanshan avatar Nov 05 '23 05:11 mynanshan