bubblePlot: bubblePlot

View source: R/bubblePlot.r

bubblePlotR Documentation

bubblePlot

Description

When a scatterplot is drawn with a very large number of points, the plot tends to end up as an indecipherable black mass. The "bubble plot" is an attempt to come to neater solution, by assembling a grid and then counting the number of points that fall within each grid cell. A circle is plotted in the centre of the grid cell whose area is proportional to a function of the number of points. This allows the bubble plot to the shape of the data whilst maintaining legibility.

Arguments

Z

Two-dimensional data matrix

xlim

Vector giving min and max value of X range to be plotted (default: NULL)

ylim

Vector giving min and max value of Y range to be plotted (default: NULL)

xn

Number of grid bins in the X direction (default: 20)

yn

Number of grid bins in the Y direction (default: 20)

new.plot

Allow this function to handle setting up a plotting area, either using the values given for xlim etc. or detecting them from the data (default: TRUE)

drawGrid

Draw the underlying grid (default: FALSE)

addText

Vector of text labels to add to the bubbles (default: FALSE)

offsetTextMin

(default: 200)

cexText

Text labels character expansion (default: 1)

colText

Text label colour (default: 1)

cex.unit

The size of a bubble containing one observation (default: 1)

pch

(default: 21)

colBubble

(default: 2)

colBubbleBorder

(default: 1)

mar

Vector of margins, in order c(bottom, left, top, right) (default: c(4, 4, 4, 4))

scalefn

Function (of x) that is used to scale the size of the bubbles according to the number of observations, which multiplies cex.unit. Default is to increase area linearly with number of observations, which is equivalent to scaling the radius by the square root of number of observations. (default: function(x) sqrt(x))

axes

Allow this function to draw axes automatically (default: TRUE)

xaxis.line

(default: 1)

yaxis.line

(default: 1)

mainfont

Font scaling applied to cex (default: 1)

useHardcore

Instead of using grid to allocated bubbles, lay down a Hardcore point process in the plotting region and compute its Voronoi tesselation. The resulting Voronoi cells define the bubbles. (default: FALSE)

HCintensity

Intensity of Hardcore point process, if used (default: 100)

HCinhibition

Inhibition distance of Hardcore point process, if used. No points will be closer together than this distance (default: 0.01)

useParallel

(default: TRUE)

Author(s)

Matt Arnold


arnhew99/Jasper documentation built on Nov. 19, 2022, 2:46 p.m.