draw | R Documentation |
The draw()
function is humdrumR's goto plotting function.
draw()
can make a variety of graphs, depending on the type of data you give it.
For the most part, draw()
is simply a stylish, easy to use wrapper around
the base-R graphics functions plot()
, barplot()
, and hist()
.
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'numeric,numeric'
draw(
x,
y,
col = 3,
log = "",
jitter = "xy",
xlim = NULL,
ylim = NULL,
xat = NULL,
yat = NULL,
cex = prep_cex(x),
...
)
## S4 method for signature 'numeric,missing'
draw(
x,
y,
col = 3,
breaks = "Sturges",
jitter = "",
...,
cex = prep_cex(x) * 0.75,
xlim = NULL,
ylim = NULL
)
## S4 method for signature 'missing,numeric'
draw(
x,
y,
col = 3,
log = "",
jitter = "",
...,
cex = prep_cex(y),
yat = NULL,
quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975)
)
## S4 method for signature 'discrete,discrete'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'discrete,missing'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'token,missing'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'missing,token'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'token,token'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'count,ANY'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'table,ANY'
draw(
x,
y,
col = 1:nrow(x),
log = "",
...,
ylim = NULL,
yat = NULL,
beside = TRUE
)
## S4 method for signature 'humdrumR.table,ANY'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
## S4 method for signature 'probability,ANY'
draw(x, y, col = 1:nrow(x), log = "", ..., yat = NULL, beside = TRUE)
## S4 method for signature 'discrete,numeric'
draw(x, y, col = 3, log = "", breaks = "Sturges", ..., yat = NULL)
## S4 method for signature 'list,numeric'
draw(x, y, col = 3, log = "", breaks = "Sturges", ..., yat = NULL)
## S4 method for signature 'formula,ANY'
draw(x, y, col = 2, xlab = NULL, ylab = NULL, data = NULL, ...)
## S4 method for signature 'humdrumR,ANY'
draw(
x,
y,
col = 2,
facet = list(),
main = "",
sub = "",
xlab = NULL,
ylab = NULL,
...
)
draw()
is a generic function, which does different plots depending on the data you pass to its
x
and y
arguments.
x
and y
both numeric: scatter plot.
x
numeric by itself: histogram.
y
numeric by itself: quantile plot.
x
is a table: barplot.
y
is numeric, x
is character
or factor
: a violin plot.
All the standard arguments to base-R plots can be used to customize plots.
See par()
for a full list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.