Skip to content

Commit

Permalink
Also hide for matplotlib special handling
Browse files Browse the repository at this point in the history
  • Loading branch information
cderv committed Apr 23, 2024
1 parent 7d0745d commit 8041ace
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/knitr-engine.R
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,11 @@ eng_python <- function(options) {
plt$show()
}

for (plot in .engine_context$pending_plots$data())
outputs_target$push(plot)
.engine_context$pending_plots$clear()

if (!is_hidden && is_include) {
for (plot in .engine_context$pending_plots$data())
outputs_target$push(plot)
.engine_context$pending_plots$clear()
}

# if we were using held outputs, we just inject the source in now
if (is_hold) {
Expand Down

0 comments on commit 8041ace

Please sign in to comment.