Rug Plot Calculator

Explore numeric distributions with interactive rug marks, grouped comparisons, density overlays, transformations, outlier detection, detailed statistics, and flexible exports for machine learning analysis workflows.

Rug Plot Result

Waiting for data
Enter values or load sample data, then select Generate Rug Plot.

Statistical Summary

Distribution Analysis

1. Data Input

Use one value per line, or value and group separated by comma, tab, semicolon, or pipe.

2. Plot Configuration

3. Rug Mark Controls

Current: 15
Current: 2
Current: 0.8
Current: 0.15
Current: 0.3

4. Overlays and Distribution Options

Current: 0.45

5. Data Processing

IQR multiplier, z-score limit, or modified z-score limit.

6. Generate and Manage

Detailed Results

Group Summary

GroupCountPercentageMeanMedianStandard deviationOutliers
Index Original Transformed Group Frequency Percentile Outlier Duplicate Included

Formula Used

Each rug mark is positioned at an observed numeric value. The mark location follows the selected axis and transformation.

Rug position = T(xᵢ)

Gaussian KDE:
f̂(x) = 1 / (n × h) × Σ K((x - xᵢ) / h)

IQR outlier limits:
Lower = Q1 - k × IQR
Upper = Q3 + k × IQR

The density estimate uses the selected kernel and bandwidth. Outlier rules can use IQR, z-scores, modified z-scores, or custom limits.

How to Use

  1. Paste numeric values or upload a CSV or TXT file.
  2. Select value and optional group columns after uploading data.
  3. Choose rug orientation, mark style, overlays, and colors.
  4. Apply transformations, filters, and an outlier detection method.
  5. Select Generate Rug Plot to calculate and visualize results.
  6. Review summary statistics, distribution findings, and observation details.
  7. Copy results or export CSV, PNG, SVG, and printable PDF reports.

Example Data

ValueGroupInterpretation
12.5TrainLower-range training observation
18.2TrainCentral training observation
22.7TestCentral testing observation
41.8TestPossible high-value outlier

Machine Learning Applications

Rug plots reveal feature coverage, repeated values, sparse regions, and distribution gaps. They support train-test comparison, class imbalance inspection, residual analysis, and distribution-shift checks.

Grouped marks can compare classes, clusters, predictions, and validation splits. Density, histogram, box, violin, and ECDF overlays add complementary context.

Frequently Asked Questions

What is a rug plot?

A rug plot places a short mark for every observation along an axis. Dense mark clusters indicate concentrated values.

Why use rug plots in machine learning?

They reveal feature coverage, duplicates, outliers, sparse areas, and class distribution differences before or after model training.

Can this calculator compare groups?

Yes. Add group labels manually or select a CSV group column to create colored group traces and summaries.

How are duplicate values handled?

You can keep, stack, merge, remove, or scale duplicate marks according to their observed frequency.

Which bandwidth should I choose?

Silverman works well for many datasets. Scott is another automatic choice, while custom bandwidth offers direct smoothing control.

How are outliers detected?

The calculator supports IQR limits, standard z-scores, modified z-scores, and user-defined lower and upper limits.

Can I transform values before plotting?

Yes. Available transformations include standardization, normalization, logarithms, square roots, centering, percentages, and winsorization.

What happens with invalid rows?

Nonnumeric or incomplete rows are rejected. The result message reports valid, filtered, excluded, and rejected observations.

Can I export the chart?

Yes. Export the plot as PNG or SVG, download results as CSV, and print the report to PDF.

Are large datasets supported?

Yes, but dense marks may overlap. Use merging, frequency scaling, lower opacity, or filtering for clearer interpretation.

Related Calculators

HistogramDensity Plot (KDE)Box PlotViolin PlotBar ChartCount PlotPie ChartDot PlotStrip PlotSwarm Plot

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.