Learn R Programming

handwriter (version 3.2.4)

plot_graphs: Plot Graphs

Description

Use processDocument() to split handwritting into component shapes called graphs. plot_graphs() creates a plot that displays the graphs. ggplot2::facet_wrap() places each graph in its own facet, and ncol sets the number of columns of facets.

Usage

plot_graphs(doc, ncol = NULL)

Value

A plot of all graphs in the document

Arguments

doc

A PNG image of handwriting processed with processDocument().

ncol

Optionally, set the number of columns in the output plot. The default is NULL which allows ggplot2::facet_wrap() to automatically choose the number of columns.

Examples

Run this code
image_path <- system.file("extdata", "phrase_example.png", package = "handwriter")
doc <- processDocument(image_path)
plot_graphs(doc)

Run the code above in your browser using DataLab