5 deleted 31 characters in body

# DensityHistogram with sub-option "DistributionAxes" -> "Lines"

## "DistributionAxes" -> "Lines"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

SeedRandom[1]
dt = RandomReal[1, {50, 2}];

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


# UnivariateDataRug

## UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing (to remove arrows and to change orientation), the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


# DensityHistogram with sub-option "DistributionAxes" -> "Lines"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

SeedRandom[1]
dt = RandomReal[1, {50, 2}];

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


# UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing (to remove arrows and to change orientation), the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


## "DistributionAxes" -> "Lines"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

SeedRandom[1]
dt = RandomReal[1, {50, 2}];

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


## UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing (to remove arrows and to change orientation), the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


4 added 41 characters in body
SeedRandom[1]
dt = RandomReal[1, {50, 2}];


DensityHistogram with sub-option "DistributionAxes"

# DensityHistogram with sub-option "DistributionAxes" -> "Lines"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

SeedRandom[1]
dt = RandomReal[1, {50, 2}];

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


UnivariateDataRug

# UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing (to remove arrows and to change orientation), the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


SeedRandom[1]
dt = RandomReal[1, {50, 2}];


DensityHistogram with sub-option "DistributionAxes"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing, the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


# DensityHistogram with sub-option "DistributionAxes" -> "Lines"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

SeedRandom[1]
dt = RandomReal[1, {50, 2}];

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


# UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing (to remove arrows and to change orientation), the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


3 deleted 41 characters in body
SeedRandom[1]
dt = RandomReal[1, {50, 2}];


DensityHistogram with sub-option "DistributionAxes"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


StatisticsDataDistributionUtilitiesUnivariateDataRugUnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing, the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


SeedRandom[1]
dt = RandomReal[1, {50, 2}];


DensityHistogram with sub-option "DistributionAxes"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


StatisticsDataDistributionUtilitiesUnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing, the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


SeedRandom[1]
dt = RandomReal[1, {50, 2}];


DensityHistogram with sub-option "DistributionAxes"

You can use DensityHistogram with suboption "DistributionAxes" -> "Lines" and ListPlot of the data as Epilog:

DensityHistogram[dt, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt, PlotStyle -> {Red, PointSize[Large]}][[1]]]


Alternatively, with sufficiently many equal-sized bins or sufficiently small bin widths, we can use ChartElementFunction -> "Point" in DensityHistogram to get a ListPlot of data without using Epilog:

DensityHistogram[dt, {100, 100},
Method -> {"DistributionAxes" -> "Lines"}, ColorFunction -> (Red &),
ChartBaseStyle -> PointSize[Large], ChartElementFunction -> "Point"]


Another example:

dist1 = BinormalDistribution[{1, 1}, {1, 1}, 1/2];
dist2 = BinormalDistribution[{5, 5}, {1, 1}, -1/2]; dt2 =
RandomVariate[MixtureDistribution[{3, 2}, {dist1, dist2}], 300];
DensityHistogram[dt2, Method -> {"DistributionAxes" -> "Lines"},
BaseStyle -> FaceForm[],
Epilog -> ListPlot[dt2, PlotStyle -> {Red, PointSize[Large]}][[1]]]


UnivariateDataRug

StatisticsDataDistributionUtilitiesUnivariateDataRug[dt[[All, 1]]]


With some processing, the output of StatisticsDataDistributionUtilitiesUnivariateDataRug can be used to construct data rugs for the vertical and horizontal axes.

ClearAll[rugF]
rugF[dir : ("horizontal" | "vertical") : "horizontal"] :=
Module[{rule = If[dir === "horizontal",
Thread[{{x_, 0}, {x_, 1}} :> {{x, -.025}, {x, -.075}}],
Thread[{{x_, 0}, {x_, 1}} :> {{-.025, x}, {-.075, x}}]]},
StatisticsDataDistributionUtilitiesUnivariateDataRug[#] /.
Arrow[x_] :> {CapForm["Butt"], Line[x]} /. rule ] &;

Show[ListPlot[dt, PlotStyle -> PointSize[Large]],
rugF["vertical"][dt[[All, 2]]], rugF[][dt[[All, 1]]],
AspectRatio -> 1, Frame -> True, AxesOrigin -> {0, 0},
PlotRangePadding -> {{.1, Scaled[.02]}, {.1, Scaled[.02]}}]


2 added 967 characters in body
1