View source: R/plot_augmented_design.R
| plot_augmented_design | R Documentation |
Plot fieldbook sketches for augmented experimental designs generated by
design_augmented().
plot_augmented_design(
data,
factor = NA,
fill = "plots",
xlab = NULL,
ylab = NULL,
glab = NULL,
text_size = NULL,
wrap_width = NULL,
font_family = "Open Sans",
font_face = "plain"
)
data |
Fieldbook data frame from an augmented design. |
factor |
Character scalar. Column used to color experimental units.
If missing, |
fill |
Character vector. Column or columns used as labels inside each
experimental unit. Default is |
xlab |
Character scalar. Optional x axis title. If |
ylab |
Character scalar. Optional y axis title. If |
glab |
Character scalar. Optional legend title. If |
text_size |
Optional positive numeric scalar indicating the plot-label
font size in typographic points ( |
wrap_width |
Optional positive integer indicating the approximate
maximum number of characters per line. If |
font_family |
Character scalar. Font family used in the sketch.
Defaults to |
font_face |
Character scalar. Font face used in labels, axes and
legends. Defaults to |
The function always uses the physical rows and cols coordinates stored in
the fieldbook. Therefore, custom dimensions and zigzag layouts are preserved.
The block column never replaces rows as a plotting coordinate. When each
row represents exactly one block, only the visible y-axis title changes from
"Rows" to "Blocks". The statistical block remains available as a color
factor and, when a block occupies a complete rectangular region, its external
border is highlighted.
Empty experimental units are represented by the level "empty". When
factor = "type", checks, test entries and empty plots receive stable
colors. Other factor columns use the regular TARPUY color palette.
Automatic wrapping and formatting affect only the displayed text. They do
not modify entry, plots, ntreat, QR codes or any other fieldbook value.
A ggplot object.
## Not run:
plot_augmented_design(
data = fieldbook,
factor = "type",
fill = c("plots", "entry"),
text_size = 9,
font_family = "Open Sans",
font_face = "plain"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.