The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Type: Package
Title: Pretty Base Graphics
Version: 0.2.2
Maintainer: Colin Gillespie <csgillespie@gmail.com>
Description: Drop-in replacements for standard base graphics functions. The replacements are prettier versions of the originals.
License: GPL-2 | GPL-3
URL: https://github.com/jumpingrivers/prettyB/
BugReports: https://github.com/jumpingrivers/prettyB/issues
Imports: graphics, grDevices, stats
Suggests: covr, knitr, lintr, rmarkdown, testthat, vdiffr
VignetteBuilder: knitr
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
NeedsCompilation: no
Packaged: 2021-02-10 13:01:19 UTC; ncsg3
Author: Colin Gillespie [aut, cre]
Repository: CRAN
Date/Publication: 2021-02-10 13:50:03 UTC

The prettyB package

Description

Anyone who uses R Base graphics, have a 100 and 1 tweaks that they use to make the figures more presentable. This package aims to capture the tweaks in one place. By masking_standard plotting functions, we can automatically make base graphics a bit more pretty.

Author(s)

csgillespie@gmail.com

See Also

https://github.com/jumpingrivers/prettyB


Add tick marks to x/y axis A nicer set of default tick marks

Description

Add tick marks to x/y axis

A nicer set of default tick marks

Usage

add_x_axis(ticks_x, labels = ticks_x, tick = TRUE, lwd = 0, lwd.ticks = 1)

add_y_axis(ticks_y, labels = ticks_y, tick = TRUE, lwd = 0, lwd.ticks = 1)

Arguments

ticks_x

location of x tick mark

labels

tick label

tick

Display tick mark

lwd

width of line

lwd.ticks

width of tick mark

ticks_y

location of y tick mark


PrettyB barplot.default function

Description

This function overrides the default arguments. See ?graphics::barplot.default

Usage

## S3 method for class 'prettyB'
barplot(
  height,
  width = 1,
  space = NULL,
  names.arg = NULL,
  legend.text = NULL,
  beside = FALSE,
  horiz = FALSE,
  density = NULL,
  angle = 45,
  col = NULL,
  border = par("fg"),
  main = NULL,
  sub = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  xpd = TRUE,
  log = "",
  axes = TRUE,
  axisnames = TRUE,
  cex.axis = par("cex.axis"),
  cex.names = par("cex.axis"),
  inside = TRUE,
  plot = TRUE,
  axis.lty = 0,
  offset = 0,
  add = FALSE,
  args.legend = NULL,
  ...
)

barplot_p(
  height,
  width = 1,
  space = NULL,
  names.arg = NULL,
  legend.text = NULL,
  beside = FALSE,
  horiz = FALSE,
  density = NULL,
  angle = 45,
  col = NULL,
  border = par("fg"),
  main = NULL,
  sub = NULL,
  xlab = NULL,
  ylab = NULL,
  xlim = NULL,
  ylim = NULL,
  xpd = TRUE,
  log = "",
  axes = TRUE,
  axisnames = TRUE,
  cex.axis = par("cex.axis"),
  cex.names = par("cex.axis"),
  inside = TRUE,
  plot = TRUE,
  axis.lty = 0,
  offset = 0,
  add = FALSE,
  args.legend = NULL,
  ...
)

Arguments

height, width, space

See ?graphics::barplot.default

names.arg, legend.text, beside

See ?graphics::barplot.default

horiz, density, angle, col

See ?graphics::barplot.default

border, main, sub, xlab, ylab

See ?graphics::barplot.default

xlim, ylim, xpd, log, axes

See ?graphics::barplot.default

axisnames, cex.axis, cex.names

See ?graphics::barplot.default

inside, plot, axis.lty

See ?graphics::barplot.default

offset, add, args.legend

See ?graphics::barplot.default

...

See ?graphics::barplot.default

Examples

barplot(VADeaths)

PrettyB boxplot.default function

Description

This function overrides the default arguments. See ?graphics::boxplot.default

Usage

## S3 method for class 'prettyB'
boxplot(
  x,
  ...,
  range = 1.5,
  width = NULL,
  varwidth = FALSE,
  notch = FALSE,
  outline = TRUE,
  names,
  plot = TRUE,
  border = par("fg"),
  col = NULL,
  log = "",
  pars = list(boxwex = 0.8, staplewex = 0.5, outwex = 0.5),
  horizontal = FALSE,
  add = FALSE,
  at = NULL
)

boxplot_p(
  x,
  ...,
  range = 1.5,
  width = NULL,
  varwidth = FALSE,
  notch = FALSE,
  outline = TRUE,
  names,
  plot = TRUE,
  border = par("fg"),
  col = NULL,
  log = "",
  pars = list(boxwex = 0.8, staplewex = 0.5, outwex = 0.5),
  horizontal = FALSE,
  add = FALSE,
  at = NULL
)

Arguments

x, ..., range, width

See ?graphics::boxplot.default

varwidth, notch, outline

See ?graphics::boxplot.default

names, plot, border

See ?graphics::boxplot.default

col, log, pars

See ?graphics::boxplot.default

horizontal, add, at

See ?graphics::boxplot.default


PrettyB hist.default function

Description

This function overrides the default arguments. See ?graphics::hist.default

Usage

## S3 method for class 'prettyB'
hist(
  x,
  breaks = "Sturges",
  freq = NULL,
  probability = !freq,
  include.lowest = TRUE,
  right = TRUE,
  density = NULL,
  angle = 45,
  col = NULL,
  border = NULL,
  main = paste("Histogram of", xname),
  xlim = range(breaks),
  ylim = NULL,
  xlab = xname,
  ylab,
  axes = TRUE,
  plot = TRUE,
  labels = FALSE,
  nclass = NULL,
  warn.unused = TRUE,
  ...
)

hist_p(
  x,
  breaks = "Sturges",
  freq = NULL,
  probability = !freq,
  include.lowest = TRUE,
  right = TRUE,
  density = NULL,
  angle = 45,
  col = NULL,
  border = NULL,
  main = paste("Histogram of", xname),
  xlim = range(breaks),
  ylim = NULL,
  xlab = xname,
  ylab,
  axes = TRUE,
  plot = TRUE,
  labels = FALSE,
  nclass = NULL,
  warn.unused = TRUE,
  ...
)

Arguments

x, breaks, freq, probability

See ?graphics::hist.default

include.lowest, right, density

See ?graphics::hist.default

angle, col, border, main

See ?graphics::hist.default

xlim, ylim, xlab, ylab, axes, plot

See ?graphics::hist.default

labels, nclass, warn.unused

See ?graphics::hist.default

...

See ?graphics::hist.default

Examples

x = rlnorm(100)
hist(x)

PrettyB plot.default function

Description

This function overrides the default arguments. See ?graphics::plot.default

Usage

## S3 method for class 'prettyB'
plot(
  x,
  y = NULL,
  type = "p",
  xlim = NULL,
  ylim = NULL,
  log = "",
  main = NULL,
  sub = NULL,
  xlab = NULL,
  ylab = NULL,
  ann = par("ann"),
  axes = TRUE,
  frame.plot = axes,
  panel.first = NULL,
  panel.last = NULL,
  asp = NA,
  ...
)

plot_p(
  x,
  y = NULL,
  type = "p",
  xlim = NULL,
  ylim = NULL,
  log = "",
  main = NULL,
  sub = NULL,
  xlab = NULL,
  ylab = NULL,
  ann = par("ann"),
  axes = TRUE,
  frame.plot = axes,
  panel.first = NULL,
  panel.last = NULL,
  asp = NA,
  ...
)

Arguments

x, y, type, log

See ?graphics::plot.default

xlim, ylim

See ?graphics::plot.default

main, sub, xlab, ylab

See ?graphics::plot.default

ann, axes

See ?graphics::plot.default

frame.plot, panel.first, panel.last

See ?graphics::plot.default

asp

See ?graphics::plot.default

...

See ?graphics::plot.default

Examples

plot_p(1:10, 1:10)

Set up par and palette Sets up par and palette

Description

Set up par and palette

Sets up par and palette

Usage

reset_prettyB()

setup_prettyB()

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.