trim_intermediate_plots: Trim away intermediate plots

View source: R/graphics.R

trim_intermediate_plotsR Documentation

Trim away intermediate plots

Description

Trim off plots that are modified by subsequent lines to only show the "final" plot.

Usage

trim_intermediate_plots(x)

Arguments

x

An evaluation object produced by evaluate().

Value

A modified evaluation object.

Examples

ev <- evaluate(c(
  "plot(1:3)",
  "text(1, 1, 'x')",
  "text(1, 1, 'y')"
))

# All intermediate plots are captured
ev
# Only the final plot is shown
trim_intermediate_plots(ev)

evaluate documentation built on Oct. 10, 2024, 5:06 p.m.