plot_usq: Basic X-Y plotting using USQ colours and typography

Description Usage Arguments Details See Also Examples

View source: R/plot_usq.R

Description

Basic X-Y plotting that follows USQ colour and typography guidelines that uses (hopefully) sensible defaults.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_usq(
  x,
  y = NULL,
  main = "",
  sub = "",
  xlab = "",
  ylab = "",
  xlim = NULL,
  ylim = NULL,
  col = "usq charcoal",
  ...
)

Arguments

x

Values to be plotted on x-axis.

y

Values to be used on y-axis. Optional.

main

Main title text

sub

Subtitle text below x-axis label

xlab

X-axis label. Optional, if blank will default to data supplied label.

ylab

Y-axis label. Optional, if blank will default to data supplied label if one is available.

xlim

Numeric value for x-axis limits. Optional.

ylim

Numeric value for y-axis limits. Optional.

col

Colour to use as fill and outline for boxes and outlier points as a digit. Defaults to "usq charcoal". There are fifteen colours that can be used, see Details for more.

...

Arguments to be passed to methods, such as graphical parameters (see par). The most commonly used argument would be type what type of plot should be drawn. Possible types are:

  • "p" for points,

  • "l" for lines,

  • "b" for both,

  • "c" for the lines part alone of "b",

  • "o" for both ‘overplotted’,

  • "h" for ‘histogram’ like (or ‘high-density’) vertical lines,

  • "s" for stair steps,

  • "n" for no plotting.

Details

Names of colours for use in plots from the USQ Visual Identity Palette are available from link{usq_cols}.

See Also

plot for full documentation of the basic plotting capabilities.

Examples

1
2
3
4
5
6
library(datasets)

plot_usq(airquality$Ozone,
         col = "usq charcoal",
         main = "Air Quality",
         xlab = "Ozone")

adamhsparks/theme_usq documentation built on Nov. 18, 2020, 3:50 a.m.