Author: Andreas Brandmaier
Date: 2025-07-23

# Plots

#### Andreas Brandmaier

#### 2025-07-23

# Plot

Note that base R plots typically produce graphical output directly to the current graphics device, without assigning the result to a variable. By design, the `reproducibleRchunks` package only tracks metadata for variables that are explicitly created within each code chunk. Since standard plotting commands do not involve variable assignment, their output is not checked for reproducibility. See the following example, in which only the newly declared variables `x` and `y` are subject to a reproducibility check but not the plot:

    x <- seq(1,10,.1)
    y <- sin(x)
    plot(x,y)

Reproducibility Checks

- ✅x: REPRODUCTION SUCCESSFUL

- ✅y: REPRODUCTION SUCCESSFUL

Note that there is the function `recordPlot()` which records the plot from a graphics device. However the result object contains system-specific information such as local paths to R’s, internal libraries and the R version used or a process id, which makes reproducibility checks on plots of base R futile. Instead, we recommend reproducibility checks on the variables that contain the data that is plotted.