Debian Codegraph @

man/is_low_change.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/plot.R
3 \name{is_low_change}
4 \alias{is_low_change}
5 \title{Compare two recorded plots}
6 \usage{
7 is_low_change(p1, p2)
8 }
9 \arguments{
10 \item{p1, p2}{Plot objects.}
11 }
12 \value{
13 Logical value indicating whether \code{p2} is a low-level update of
14 \code{p1}.
15 }
16 \description{
17 Check if one plot only contains a low-level update of another plot.
18 }
19 \examples{
20 pdf(NULL)
21 dev.control("enable") # enable plot recording
22 plot(1:10)
23 p1 = recordPlot()
24 abline(0, 1) # add a line (a low-level change)
25 p2 = recordPlot()
26 plot(rnorm(100))
27 p3 = recordPlot() # draw a completely new plot
28 dev.off()
29 knitr::is_low_change(p1, p2) # true
30 knitr::is_low_change(p1, p3) # false
31 }