Plot a scatter (xy-plot) of binned elements with binning information.
plotBinScatter(
x,
y,
b,
cols = getColsByBin(b),
xlab = deparse(substitute(x, env = as.environment(-1))),
ylab = deparse(substitute(y, env = as.environment(-1))),
main = "",
legend = "topright",
legend.cex = 1,
...
)
A numerical vector with x values.
A numerical vector with y values (the values used for binning).
A factor that groups elements of x,y
into bins (typically
the output of bin(y)
).
A color vector (will be computed based on b
by default
using getColsByBin(b)
).
Label for x-axis.
Label for y-axis.
Main title.
If not NULL
, draw a legend with binning information
(will be passed to legend(x=legend)
to control legend position).
A scalar that controls the text size in the legend relative
to the current par("cex")
(see legend
).
Further arguments passed to plot(x, y, ...)
.
TRUE
(invisibly).