par(mfrow=c(3,1))
hist(iris$Petal.Width [iris$Species == "setosa"],
xlim = c(0,3),
breaks = 9,
main = "Petal Width for Setosa",
xlab = "",
col = "red")
hist(iris$Petal.Width [iris$Species == "virginica"],
xlim = c(0,3),
breaks = 9,
main = "Petal Width for Virginica",
xlab = "",
col = "green")
hist(iris$Petal.Width [iris$Species == "versicolor"],
xlim = c(0,3),
breaks = 9,
main = "Petal Width for Versicolor",
xlab = "",
col = "blue")
par(mfrow=c(1,1)) # reset layout
This usually happens in RStudio if the plots pane is too small. Enlarging the plots view in Positron doesn't seem to help. Using par(mfrow=c(1,3)) does work if the plots view is wide enough but doesn't always update to show the last plot. It does fail if setting a custom plot size of 100x100. A larger custom plot size still has an error with the reprex.
What did you expect to happen?
All three plots render in the same plotting space like this:
Were there any error messages in the output or Developer Tools console?
Error in `plot.new()`:
! figure margins too large
Hide Traceback
▆
1. ├─graphics::hist(...)
2. └─graphics::hist.default(...)
3. ├─base::plot(...)
4. └─graphics:::plot.histogram(...)
5. └─graphics::plot.new()
Positron Version:
Positron Version: 2024.06.0 (Universal) build 770 Code - OSS Version: 1.90.0 Commit: 5d79ea68dceb5b734475af851b64cb3c0a323285 Date: 2024-06-14T05:53:04.122Z Electron: 29.4.0 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Darwin arm64 23.4.0
R 4.4.0
Steps to reproduce the issue:
Reprex:
This usually happens in RStudio if the plots pane is too small. Enlarging the plots view in Positron doesn't seem to help. Using
par(mfrow=c(1,3))
does work if the plots view is wide enough but doesn't always update to show the last plot. It does fail if setting a custom plot size of 100x100. A larger custom plot size still has an error with the reprex.What did you expect to happen?
All three plots render in the same plotting space like this:![image](https://github.com/posit-dev/positron/assets/9591545/f3ec5bf4-59ad-40ce-ad24-533e8150adfa)
Were there any error messages in the output or Developer Tools console?