Learn R Programming

artma (version 0.3.3)

viz.set: Set Visualization Settings

Description

Set visualization options for the current session. Only provided arguments are changed; others remain unchanged.

Usage

viz.set(
  theme = NULL,
  export_graphics = NULL,
  export_path = NULL,
  graph_scale = NULL
)

Value

Previous settings (invisibly), enabling easy restoration.

Arguments

theme

[character, optional] Color theme. Use viz.themes() to see available themes.

export_graphics

[logical, optional] If TRUE, export plots to files.

export_path

[character, optional] Directory path for exported plots.

graph_scale

[numeric, optional] Scaling factor for exported graphics. Values > 1 increase resolution.

Examples

Run this code
if (FALSE) {
# Change theme
viz.set(theme = "purple")

# Enable export with custom path
viz.set(export_graphics = TRUE, export_path = "./output/plots")

# Save and restore settings
prev <- viz.set(theme = "red")
# ... do work ...
do.call(viz.set, prev)
}

Run the code above in your browser using DataLab