Skip to contents

Configures aesthetic and layout settings for plots generated by ggparallel.

Usage

ggparallel_options(
  show_legend = TRUE,
  show_legend_titles = FALSE,
  legend_position = c("bottom", "right", "left", "top"),
  legend_title_position = c("left", "top", "bottom", "right"),
  legend_nrow = NULL,
  legend_ncol = NULL,
  legend_key_size = 1,
  beautify_text = TRUE,
  beautify_values = FALSE,
  beautify_function = beautify,
  max_digits_bounds = 1,
  x_axis_text_angle = 90,
  x_axis_text_hjust = 0,
  x_axis_text_vjust = 0.5,
  fontsize_x_axis_text = 12,
  show_column_names = TRUE,
  show_points = FALSE,
  show_bounds_labels = FALSE,
  show_bounds_rect = FALSE,
  line_alpha = 0.5,
  line_width = NULL,
  line_type = 1,
  x_axis_gridlines = ggplot2::element_line(colour = "black"),
  interactive_svg_width = NULL,
  interactive_svg_height = NULL
)

Arguments

show_legend

Display the legend on the plot (flag).

show_legend_titles

Display titles for legends (flag).

legend_position

Position of the legend ("right", "left", "bottom", "top").

legend_title_position

Position of the legend title ("top", "bottom", "left", "right").

legend_nrow

Number of rows in the legend (number).

legend_ncol

Number of columns in the legend. If set, legend_nrow should be NULL (number).

legend_key_size

Size of the legend key symbols. (number).

beautify_text

Beautify y-axis text and legend titlesto more human-readable forms (e.g. converting 'my_title' to 'My Title') (flag).

beautify_values

Beautify legend values to more human-readable forms (e.g. converting 'my_value' to 'My Value') (flag)

beautify_function

a function that takes a string and returns a nicely formatted string. Use to beautify axis & legend titles when beautify_text=TRUE, and legend values when beautify_values=TRUE.

max_digits_bounds

Number of digits to round the axis bounds label text to (number)

x_axis_text_angle

Angle of the x axis text describing column names (number)

x_axis_text_hjust

Horizontal Justification of the x axis text describing column names (number)

x_axis_text_vjust

Vertical Justification of the x axis text describing column names (number)

fontsize_x_axis_text

fontsize of the x-axis text describing column names (number)

show_column_names

Show column names as x axis text (flag)

show_points

Show points (flag)

show_bounds_labels

Show bounds (min and max value) of each feature with labels above / below the axes (flag)

show_bounds_rect

Show bounds (min and max value) of each feature with a rectangular graphic (flag)

line_alpha

Alpha of line geom (number)

line_width

Width of the line geom (number)

line_type

Type of line geom (number or string. see ggplot2::aes_linetype_size_shape() for valid options)

x_axis_gridlines

Customise look of x axis gridlines. Must be either a call to ggplot2::element_line() or ggplot2::element_blank().

interactive_svg_width, interactive_svg_height

Width and height of the interactive graphic region (in inches). Only used when interactive = TRUE.

Value

A list of visualization parameters for ggparallel.

Examples

ggparallel(
  data = minibeans,
  col_colour = "Class",
  order_columns_by = "auto"
)
#>  Ordering columns based on mutual information with [Class]
#>  Making plot interactive since `interactive = TRUE`
Perimeter Convex Area Area Equiv Diameter Shape Factor2 Major Axis Length Compactness Shape Factor3 Aspect Ratio Eccentricity Roundness Minor Axis Length Shape Factor1 Shape Factor4 Solidity Extent DERMASON SIRA SEKER HOROZ CALI BARBUNYA BOMBAY
ggparallel( data = minibeans, col_colour = "Class", highlight = "DERMASON", order_columns_by = "auto" ) #> Ordering columns based on how well they differentiate 1 group from the rest [DERMASON] (based on mutual information) #> Making plot interactive since `interactive = TRUE`
Area Equiv Diameter Convex Area Perimeter Minor Axis Length Shape Factor1 Major Axis Length Shape Factor2 Roundness Compactness Shape Factor3 Aspect Ratio Eccentricity Shape Factor4 Solidity Extent SIRA SEKER HOROZ CALI BOMBAY BARBUNYA DERMASON
# Customise appearance using options argument ggparallel( data = minibeans, col_colour = "Class", order_columns_by = "auto", options = ggparallel_options(show_legend = FALSE) ) #> Ordering columns based on mutual information with [Class] #> Making plot interactive since `interactive = TRUE`
Perimeter Convex Area Area Equiv Diameter Shape Factor2 Major Axis Length Compactness Shape Factor3 Aspect Ratio Eccentricity Roundness Minor Axis Length Shape Factor1 Shape Factor4 Solidity Extent DERMASON SIRA SEKER HOROZ CALI BARBUNYA BOMBAY