plot.qr_code: Plot the QR code This function plots to QR code to the open...

View source: R/plot.R

plot.qr_codeR Documentation

Plot the QR code This function plots to QR code to the open device.

Description

Plot the QR code This function plots to QR code to the open device.

Usage

## S3 method for class 'qr_code'
plot(x, col = c("white", "black"), y, ...)

## S3 method for class 'qr_logo'
plot(x, col = c("white", "black"), y, ...)

Arguments

x

the qr_code object

col

Define the colours. The first element refers to FALSE and the second TRUE. Defaults to c("white", "black").

y

currently ignored

...

currently ignored

Author(s)

Thierry Onkelinx

See Also

opencv::ocv_qr_detect() for reading QR codes.

Other qr: coordinates(), generate_svg(), print.qr_code(), qr_code(), qr_event(), qr_location(), qr_sepa(), qr_wifi()

Other qr: coordinates(), generate_svg(), print.qr_code(), qr_code(), qr_event(), qr_location(), qr_sepa(), qr_wifi()

Examples

qr <- qr_code("HELLO WORLD")
plot(qr)

# Test the QR code with the opencv package
if (requireNamespace("opencv")) {
  png("test.png")
  plot(qr)
  dev.off()
  opencv::ocv_qr_detect(opencv::ocv_read('test.png'))
  unlink("test.png")
}

ThierryO/qrcode documentation built on Oct. 2, 2024, 9:02 p.m.