S3 class for configuring plot layout including dimensions, margins, grids and coordinate systems.
new_layout_config(
width = 8,
height = 8,
dpi = 300,
aspect_ratio = 1,
show_grid = TRUE,
grid_type = "major",
grid_color = "grey80",
grid_linetype = "dashed",
show_axis = TRUE,
axis_lines = TRUE,
plot_margin = margin(1, 1, 1, 1, "cm"),
coord_type = "fixed",
background_color = "white",
panel_background_color = "white",
panel_border = TRUE,
panel_border_color = "black",
save_plot = FALSE,
save_format = "png",
reverse_x = 1,
reverse_y = 1,
x_limits = NULL,
y_limits = NULL,
arrow_plot_threshold = 0.1
)
An S3 object of class layout_config
, which is a list containing
the specified configuration parameters for plot layout.
Plot width in inches
Plot height in inches
Plot resolution
Plot aspect ratio
Show plot grid
Grid type ("none", "major", "minor", "both")
Grid color
Grid line type
Show axes
Show axis lines
Plot margins in cm
Coordinate type ("fixed", "equal", "flip", "polar")
Plot background color
Panel background color
Show panel border
Panel border color
Logical. Whether to save the plot to a file.
Plot save format ("png", "pdf", "svg", "eps")
Numeric multiplier for x-axis direction (1 or -1)
Numeric multiplier for y-axis direction (1 or -1)
Numeric vector of length 2 specifying c(min, max) for x-axis. If NULL, limits are set automatically.
Numeric vector of length 2 specifying c(min, max) for y-axis. If NULL, limits are set automatically.
Threshold for velocity arrows to be drawn in the same antigenic distance unit (default: 0.10)