View source: R/tarpuy_plotdesign.R
| tarpuy_plotdesign | R Documentation |
Plot fieldbook sketches according to the experimental design type.
tarpuy_plotdesign(
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 or a design object containing a fieldbook. |
factor |
Character scalar. Column used to color experimental units.
When omitted, |
fill |
Character vector. Column or columns used as labels inside the
experimental units. Defaults to |
xlab |
Character scalar. Optional x-axis title. When |
ylab |
Character scalar. Optional y-axis title. When |
glab |
Character scalar. Optional legend title. |
text_size |
Optional positive numeric scalar indicating the plot-label
font size in typographic points ( |
wrap_width |
Optional positive integer retained for backward
compatibility. When |
font_family |
Character scalar retained for programmatic use. Defaults
to |
font_face |
Character scalar retained for programmatic use. One of
|
This function is the common plotting interface used by TARPUY. It reads the design stored in the fieldbook, chooses the corresponding plotter and sends the same plotting arguments to all supported design types.
Supported designs and plotters are:
CRD and RCBD: plot_standard_design().
Augmented: plot_augmented_design().
Splitplot-RCBD: plot_split_rcbd_design().
The function never recalculates or rearranges the design. All plotters use
cols as the x coordinate and rows as the y coordinate. Columns such as
block are used only for labels, grouping or faceting.
wrap_width, font_family and font_face remain available to avoid
breaking existing programmatic calls, but the TARPUY frontend should expose
only the general text_size control. Automatic label wrapping is used when
wrap_width = NULL.
A ggplot object.
## Not run:
tarpuy_plotdesign(
data = fieldbook,
factor = "auto",
fill = c("plots", "ntreat"),
text_size = 9
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.