
Style for Leonardo da Vinci inspired plots
style_da_vinci.Rd
Generates ggplot2 plots with aesthetic elements inspired by Leonardo da Vinci's works.
Usage
style_da_vinci(
data,
x = NULL,
y = NULL,
color_var = NULL,
fill_var = NULL,
label_var = NULL,
title = "Datos con la Maestría de Da Vinci",
subtitle = "Un estudio de proporciones y armonía",
caption = "Análisis Renacentista",
plot_type = c("column", "scatter", "line", "map"),
work_inspired_by = c("mona_lisa", "last_supper", "vitruvian_man"),
show_labels = FALSE,
add_grid_lines = FALSE,
show_background = TRUE,
add_glow = FALSE,
coord_flip = FALSE,
text_size = 16,
add_texture = NULL,
canvas = NULL,
add_margins = TRUE,
add_filter = FALSE
)
Arguments
- data
A data frame or an sf object containing the data to be visualized.
- x
A tidy-evaluated expression specifying the column name for the x-axis (for scatter, line, or column plots).
- y
A tidy-evaluated expression specifying the column name for the y-axis (for scatter, line, or column plots).
- color_var
Optional. A tidy-evaluated expression specifying the column name used for color mapping. Defaults to NULL.
- fill_var
Optional. A tidy-evaluated expression specifying the column name used for fill mapping (used in column or map plots). Defaults to NULL.
- label_var
Optional. A tidy-evaluated expression specifying the column name used for text labels. Defaults to NULL.
- title
The plot title as a string.
- subtitle
The plot subtitle as a string.
- caption
The plot caption as a string.
- plot_type
The type of plot to create: one of `"scatter"`, `"line"`, `"column"`, or `"map"`.
- work_inspired_by
A specific Da Vinci work to guide aesthetic inspiration: `"mona_lisa"`, `"last_supper"`, or `"vitruvian_man"`.
- show_labels
Logical. If TRUE, data labels are displayed. Defaults to FALSE.
- add_grid_lines
Logical. If TRUE, major grid lines are shown (only for non-map plots). Defaults to FALSE.
- show_background
Logical. If TRUE, shows the plot panel background. Defaults to TRUE.
- add_glow
Logical. If TRUE, adds a soft glow effect to map geometries. Defaults to FALSE.
- coord_flip
Logical. If TRUE, flips coordinates (e.g., for horizontal column charts with matching label orientation). Defaults to FALSE.
- text_size
Base size for text elements (titles, labels, legend). Labels and annotations scale proportionally from this value. Defaults to 16
- add_texture
Integer (1–3). Applies visual texture effects to geoms. Default: `NULL`.
- canvas
Integer (1–6). Adds canvas-style background image. Default: `NULL`.
- add_margins
Logical. Applies margins to plot and labs. Default: `TRUE`.
- add_filter
Experimental. Logical. Applies oil effect to the full graph. Default: `FALSE`.