Overlapping Histogram
Visualizes the overlap between the distributions of two or more variables. This helps in understanding the degree of overlap and separation between different distributions. It is useful for comparing the distributions of different groups, identifying areas of overlap and distinction, and assessing the degree of similarity or difference between groups.
Chart:
Code:
muze
.canvas()
.columns([{ field: "weight_bin", as: "continuous" }])
.rows(["weight"])
.data(rootData.sort([["sex"]]))
.layers([
{
mark: "bar",
encoding: {
color: {
field: "sex",
},
opacity: {
value: 0.8,
},
},
transform: {
type: "identity",
},
},
])
.config({
legend: {
color: {
range: ["#8DD3C7", "#BEBADA", "#FB8072", "#80B1D3", "#FDB462", "#B3DE69"],
},
},
})