posit-dev / posit-dev/positron

Quarto inline output does not capture incremental base R plot layers

Open
#15,544 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: notebooks-quarto bug lang: r support
Dominant language
TypeScript
Stars
4.3k
Forks
184
Avg merge
1d 11h
Merged PRs (30d)
206

Description

Description
When Quarto inline output is enabled in Positron, additions to an existing
base R plot are not displayed in the inline output.

The first plotting command appears, but later commands like points(),
lines(), and curve(..., add = TRUE) don't appear.

Example

I created a Quarto .qmd file with this R code chunk:

y <- 2 * c(1, 2, 3, 4, 5)
x <- c(1, 2, 3, 4, 5)

plot(y ~ x)
points(3, 9, col = "red", pch = 16, cex = 2)

I then ran the entire code chunk with inline output enabled.

Expected result

The graph should contain:

  • Five points from plot(y ~ x)
  • One additional large red point at x = 3, y = 9

Actual result

The initial plot appears, but the point added by points() does not appear
in the inline output.

The same problem occurs with this example:

curve(exp(-x), from = 0, to = 4, lty = 2)
curve(exp(-x^2), add = TRUE)

Only the first curve shows up. The second curve is not layered at all.

Additional information
Rendering the complete Quarto document works. So it's just the inline output as far as I can tell.

A single completed ggplot2 object displays correctly.

Environment

  • Positron Version: 2026.08.0 build 331
  • Code - OSS Version: 1.124.0
  • Commit: a3a370d4187484ce962794408c76dab702978eaf
  • Date: 2026-08-05T17:02:37-07:00
  • Electron: 42.2.0
  • Chromium: 148.0.7778.97
  • Node.js: 24.15.0
  • V8: 14.8.178.14-electron.0
  • OS: Darwin arm64 25.5.0
  • R version: 4.5.3
  • Quarto inline output: enabled

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the examples in a Quarto .qmd file with inline output enabled, then compare the inline result with a complete document render. Check how Positron captures successive base R plotting commands; done means points(), lines(), and curve(..., add = TRUE) appear alongside the initial plot.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.