Hexbin Plot Calculator

Explore dense machine learning data with customizable hexagonal bins, statistical summaries, trend overlays, selections, transformations, and export-ready interactive visualizations for deeper analysis and insights.

Hexbin plot result

Ready

Statistical summary

Density analysis

Render a plot to view density insights.

Selected-data analysis

Use box or lasso selection on visible scatter points.

Processed hexagonal bins

DatasetBinCenter XCenter YCountPercentAggregateX rangeY range
No calculated bins.
No processed output yet.

Calculator controls

Use CSV headers. Recommended columns: x, y, weight, category.
Optional second dataset for overlay or separate comparison.
0.04
Use 0 for continuous color.
0.88

Point and density layers

0.25

Trend overlays

References and annotations

Formula used

A hexbin plot maps each observation into a hexagonal cell. Every cell stores a count or selected weighted statistic. The plotted color represents that final cell value.

For a point with normalized coordinates, the calculator estimates a staggered lattice column and row. Nearby points receive the same hexagon identifier. Cell statistics are then calculated from grouped observations.

Pearson correlation uses covariance divided by both standard deviations. Density normalization divides bin probability by its approximate area. Transformations are applied before the lattice is constructed.

Bin value = aggregate(values in hexagon)
Percentage = bin count / valid observations × 100
Probability density ≈ bin count / (valid observations × hexagon area)
Pearson r = covariance(X,Y) / (SD(X) × SD(Y))

How to use

Paste paired numeric data or upload a CSV file. Select the X, Y, weight, and category columns. Remove invalid values before calculating.

Choose bin counts, aggregation, normalization, and color settings. Add scatter points, trends, contours, or marginal histograms. Adjust axes and visual styling.

Press Calculate and draw to generate the result. Inspect hexagons with hover labels. Export charts, bin tables, summaries, or reports.

Example data table

xyweightcategory
1.22.11A
1.82.51.3A
3.14.20.8B
3.44.81.5B
5.06.11.1C

Interpretation guide

Darker or stronger hexagons usually represent denser regions. Sparse cells can indicate unusual combinations or isolated observations. Large contiguous regions may suggest clusters.

Compare hexbin structure with scatter points and contours. Use regression lines for broad linear relationships. Use smoothing for curved or local patterns.

Change bin counts to test visual stability. Very few bins may hide detail. Excessive bins may exaggerate random variation.

Frequently asked questions

What is a hexbin plot?

It groups nearby two-dimensional observations into hexagons. Color represents frequency or another aggregate. It remains readable with dense data.

Why use hexagons instead of squares?

Hexagons have six equal neighboring directions. Their shape reduces directional visual bias. They also approximate circular neighborhoods effectively.

When is hexbin better than scatter?

Use it when points overlap heavily. It reveals density hidden by overplotting. Scatter overlays can still show individual observations.

How many bins should I use?

Start with automatic or moderate settings. Increase bins for larger datasets. Compare several choices before interpreting small structures.

Can bins use weighted values?

Yes, select a weight column. Choose sum, mean, median, extremes, or variation. Missing weights default safely during processing.

What does density normalization mean?

It scales counts by total observations and approximate cell area. This supports distribution comparisons. Axis transformations can change geometric interpretation.

Can I compare two datasets?

Enable Dataset B and choose overlay or separate mode. Shared scales improve direct comparison. Different distributions remain visually distinguishable.

How are outliers identified?

The calculator inspects sparse bins and IQR-based extreme points. These are indicators, not final diagnoses. Domain knowledge should confirm unusual observations.

Can I export selected points?

Use Plotly box or lasso selection on visible scatter points. The selected summary updates immediately. Copy processed data for further analysis.

Are logarithmic axes supported?

Yes, both axes can use logarithmic scaling. Values must remain strictly positive. Invalid logarithmic observations are reported and removed.

Related Calculators

Scatter PlotBubble ChartPair PlotScatterplot MatrixCorrelation Heatmap2D Density PlotJoint PlotCategorical Scatter PlotParallel Coordinates PlotAndrews Curves

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.