quik_lines: Plot a quik line plot

Description Usage Arguments Examples

View source: R/plots.R

Description

ggquik has specific standards for plots, and quik_lines helps your plot follow these.

Usage

1
2
3
4
5
quik_lines(df, dimension, measure, groups, palette_type = 'qualitative',
                        colors, point_size, dim_breaks,
                        facet_by, area = FALSE, text_size = 3,
                        alt_text_size = 4, alt_label,
                        currency, measure_unit, measure_decimal = 0, ...)

Arguments

df

The data frame containing plot data

dimension

Usually the x-axis, values like "quarter" or "account type"

measure

The column containing numerical values to be plotted

groups

The column containing the different groups of lines

palette_type

A string. Allowed values are "diverging", "sequential", and "qualitative". Default is "qualitative".

colors

The the colors to be used for the line(s)/point(s)

point_size

A numeric. The size of the points (default is 0, no points)

dim_breaks

A vector of specific dimension values that should be labeled.

facet_by

The column containing the group to facet the plots (if desired).

area

A logical. Should the plot be drawn as an area plot?

text_size

The size of the label text size. Default is 3

alt_text_size

A numeric. The size of the alternative text (default is 3)

alt_label

The column containing an alternate label (if any)

currency

A string, usually $

measure_unit

A string. Can be %, K, or M

measure_decimal

An integer. The number of decimal places to show.

...

Additional parameters to pass on it facet_wrap (e.g. scales = free, ncol = 1)

Examples

1
2
3
4
# Create a line plot from morley data
data(morley)
ggq <- quik_lines(morley, dimension = 'Run', measure = 'Speed', groups = 'Expt')
quik_theme(ggq, axis.text = 'y', axis.title = c('x', 'y'))

brascoball/ggquik documentation built on Feb. 14, 2021, 5:17 p.m.