Describe the bug
Plots are barely readable with default dimensions and resolution (whatever the layout).
getOption("vsc.dev.args")
# $width
# [1] 800
#
# $height
# [1] 1200
#
To Reproduce
Create any plot, e.g.:
Can you fix this issue by yourself? (We appreciate the help)
Maybe.
vsc.dev.args is documented in the wiki.
I guess we need to edit:
|
"r.plot.devArgs": { |
|
"type": "object", |
|
"markdownDescription": "The arguments for the png device to replay user graphics to show in VSCode. Requires `#r.plot.useHttpgd#` to be set to `false`. \n\nChanges the option `vsc.dev.args` in R.", |
|
"default": { |
|
"width": 800, |
|
"height": 1200 |
|
}, |
Which is applied by:
|
vsc.dev.args = plot$devArgs, |
Expected behavior
Provide better default (especially 1:1 aspect ratio and higher resolution), e.g.:
width: 1200,
height: 1200,
res: 200
This is more in line with e.g. png() et al., ggsave() defaults, or RStudio plot viewer.
Screenshots
Default:
With suggested change applied in settings.json:
"r.plot.devArgs": {
"width": 1200,
"height": 1200,
"res": 200
}
or in .Rprofile:
options(vsc.dev.args = list(width = 1200, height = 1200, res = 200))
we get:
Environment (please complete the following information):
- OS: all
- VSCode Version: VSCodium 1.106.37943
- R Version: all
- vscode-R version: 2.8.6
Additional context
I am aware of httpgd; I am suggested better defaults for the default viewer.
Thanks for this excellent extension!
Describe the bug
Plots are barely readable with default dimensions and resolution (whatever the layout).
To Reproduce
Create any plot, e.g.:
plot(1)Can you fix this issue by yourself? (We appreciate the help)
Maybe.
vsc.dev.argsis documented in the wiki.I guess we need to edit:
vscode-R/package.json
Lines 1822 to 1828 in 6108825
Which is applied by:
vscode-R/R/session/vsc.R
Line 38 in 6108825
Expected behavior
Provide better default (especially 1:1 aspect ratio and higher resolution), e.g.:
width: 1200,height: 1200,res: 200This is more in line with e.g.
png()et al.,ggsave()defaults, or RStudio plot viewer.Screenshots
Default:
With suggested change applied in
settings.json:or in .Rprofile:
we get:
Environment (please complete the following information):
Additional context
I am aware of
httpgd; I am suggested better defaults for the default viewer.Thanks for this excellent extension!