ggHex | R Documentation |
This function will plot x,y coordinate values summarized in hexagons in a standardized manner
ggHex( x = NULL, y = NULL, color = NULL, pal = paletteContinuous(set = "solarExtra"), bins = 200, xlim = NULL, ylim = NULL, extend = 0.05, xlabel = "x", ylabel = "y", title = "", colorTitle = "values", baseSize = 6, ratioYX = 1, FUN = "median", hexCut = c(0.02, 0.98), addPoints = FALSE, ... )
x |
A numeric vector containing the x-axis values for each point. |
y |
A numeric vector containing the y-axis values for each point. |
color |
A numeric/categorical vector containing coloring information for each point. |
pal |
A custom continuous palette from |
bins |
The number of bins to be used for plotting the hexplot. |
xlim |
A numeric vector of two values indicating the lower and upper bounds of the x-axis on the plot. |
ylim |
A numeric vector of two values indicating the lower and upper bounds of the y-axis on the plot. |
extend |
A numeric value indicating the fraction to extend the x-axis and y-axis beyond the maximum and minimum values if |
xlabel |
The label to plot for the x-axis. |
ylabel |
The label to plot for the y-axis. |
title |
The title of the plot. |
colorTitle |
The label to use for the legend corresponding to |
baseSize |
The base font size (in points) to use in the plot. |
ratioYX |
The aspect ratio of the x and y axes on the plot. |
FUN |
The function to use for summarizing data into hexagons. Typically "mean" or something similar. |
hexCut |
If this is not null, a quantile cut is performed to threshold the top and bottom of the distribution of values.
This prevents skewed color scales caused by strong outliers. The format of this should be c(a,b) where |
addPoints |
A boolean value indicating whether individual points should be shown on the hexplot. |
... |
Additional params for plotting |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.