Heatmap
Uses color to represent the values of a variable across two dimensions. This allows for the visualization of patterns and relationships within two-dimensional data. It is often used to analyze data with geographical, temporal, or categorical dimensions, such as sales data by region and time, or gene expression data across different tissues.
Chart:
Code:
muze
.canvas()
.columns(["Year"])
.rows(["Maker"])
.layers([
{
mark: "bar",
encoding: {
color: {
field: "Miles_per_Gallon",
},
text: {
field: "Miles_per_Gallon",
labelPlacement: {
anchors: ["center"],
},
},
},
},
])
.config({
axes: {
x: {
padding: 0,
},
y: {
padding: 0,
},
},
})