2D Density Plot Calculator

Explore paired machine learning data with interactive KDE, contour, heatmap, hexbin, preprocessing, statistics, grouping, bandwidth tuning, and flexible export tools instantly in one dashboard.

Density Plot Results

Density Grid Preview

X Y Density Normalized Percentile

Data and Plot Controls

Paste data or upload a file. Select columns after parsing.

Supported separators include commas, tabs, semicolons, and spaces.

Column Mapping

Density Estimation

Plot Appearance

Preprocessing and Outliers

Presets

Ready to parse the sample dataset.

    Formula Used

    A density surface estimates concentration across two numeric dimensions. Each observation contributes locally around its measured coordinate. Larger values indicate more concentrated sample regions.

    f̂(x,y) = [1 / (n × hx × hy)] × Σ K((x − xi) / hx) × K((y − yi) / hy)

    The values hx and hy control horizontal smoothing. Kernel choice controls each point's local influence shape. Density should approximately integrate to one across the plane.

    How to Use

    Paste paired observations or upload a supported data file. Parse columns, then select X and Y variables. Optional columns can define groups and observation weights.

    Choose a density method and suitable smoothing controls. Apply preprocessing only when your analysis requires transformation. Press calculate to generate statistics and interactive graphics.

    Inspect peaks, contours, correlations, and possible outliers carefully. Compare bandwidth settings before drawing strong distribution conclusions. Export charts and grids for further model analysis.

    Example Data

    XYGroupWeight
    1.101.80A1
    2.353.25A1
    3.651.75B1
    3.505.00C1

    Interpretation Guidance

    Dense regions suggest common combinations of two measured features. Separate peaks may indicate clusters, classes, or mixed populations. Broad contours can indicate noise or excessive smoothing.

    Narrow bandwidths reveal detail but may create false peaks. Wide bandwidths improve stability but can hide important structure. Compare several settings before reporting final patterns.

    Correlation summarizes direction but not complete density geometry. Curved and multimodal patterns require visual density inspection. Always connect plotted structure with domain knowledge.

    Frequently Asked Questions

    What does a 2D density plot show?

    It shows where paired observations concentrate across two dimensions. Darker or higher regions indicate greater estimated density. Contours connect locations having similar density values.

    Which bandwidth rule should I choose?

    Scott works well for many approximately smooth datasets. Silverman often produces slightly different global smoothing. Manual controls support detailed sensitivity testing.

    Why does bandwidth matter?

    Bandwidth determines how broadly each observation influences nearby locations. Small values create detailed but unstable density surfaces. Large values produce smoother but less detailed plots.

    When should I use a histogram method?

    Histograms are useful for fast summaries and large datasets. Their appearance depends strongly on bin counts. KDE usually provides a smoother continuous estimate.

    Can the calculator compare groups?

    Yes, select a group column after parsing data. Overlay mode estimates separate densities for each group. Point mode colors observations using their groups.

    How are observation weights handled?

    Weights modify each observation's contribution to estimated density. Normalization prevents arbitrary weight totals changing density scale. Negative weights are rejected during validation.

    What are Mahalanobis outliers?

    They are points distant from the multivariate data center. The method accounts for covariance between both variables. Threshold selection should reflect analytical risk.

    Should I standardize the variables?

    Standardization helps when variables use very different numeric scales. It changes interpretation into standard deviation units. Preserve original units when direct meaning matters.

    Why can log scaling fail?

    Logarithmic axes and transformations require strictly positive values. Zero and negative values cannot be displayed. Filter or transform them using another valid method.

    Related Calculators

    Scatter PlotBubble ChartPair PlotScatterplot MatrixCorrelation HeatmapHexbin 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.