Skip to content
Plotly templates

Hexbin Density

2-D hexagonal binning — better than scatter when overplotting.

Template previewPlotly
Rendering…

Make it your own.

{
  "data":[{"type":"histogram2d",
    "x":[1.0,1.2,1.3,1.5,1.7,1.8,2.0,2.1,2.3,2.5,2.6,2.8,3.0,3.1,3.3,3.5,3.6,3.7,3.9,4.0,4.2,4.4,4.5,4.6,4.8,5.0],
    "y":[2.1,2.4,2.3,2.7,2.8,3.0,3.2,3.4,3.5,3.7,3.8,4.0,4.1,4.3,4.4,4.5,4.7,4.8,5.0,5.1,5.2,5.4,5.5,5.6,5.8,6.0],
    "nbinsx":15,"nbinsy":15,
    "colorscale":"Viridis"}],
  "layout":{"title":"2-D density binning","xaxis":{"title":"x"},"yaxis":{"title":"y"}}
}