# Plot with heatmap with Plot.cell but with date labels

**URL:** <https://talk.observablehq.com/t/plot-with-heatmap-with-plot-cell-but-with-date-labels/8088>\
**Category:** Help\
**Created:** [July 12, 2023, 2:30pm UTC](https://talk.observablehq.com/t/plot-with-heatmap-with-plot-cell-but-with-date-labels/8088 "2023-07-12T14:30:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laurent-Smeets](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/laurent-smeets/32/7874_2.png) [@Laurent-Smeets](https://talk.observablehq.com/u/Laurent-Smeets)\
**Post date:** [July 12, 2023, 2:30pm UTC](https://talk.observablehq.com/t/plot-with-heatmap-with-plot-cell-but-with-date-labels/8088/1 "2023-07-12T14:30:55Z")

</div>

I am trying to make a heatmap with changes over time. However, there are too many months in my data and the labels overlap.

I am trying to use `ticks: d3.ticks(...d3.extent(hadcrut, (d) => d.year), 10)`,  
from [Cell mark | Observable Plot](https://observablehq.com/plot/marks/cell), but that doesnt seem to work on date formats. How can I create a heatmap wh ere all months are plotted, but not all are shown on the axis (maybe only January of each year: This is my notebook

> **[Plot: Simpsons ratings](https://observablehq.com/d/1ed363409edc1818)**

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [July 12, 2023, 3:32pm UTC](https://talk.observablehq.com/t/plot-with-heatmap-with-plot-cell-but-with-date-labels/8088/2 "2023-07-12T15:32:57Z")

</div>

The second chart is quite correct, I think? Here are a few changes to help make it more readable:

```auto
Plot.plot({
  width: 900,
  marginLeft: 240,
  x: {axis: "top"},
  color: {scheme: "BuYlRd"},
  marks: [
    Plot.barX(data, {
      x: "Month",
      y: "National Inflation Rate",
      interval: "month",
      inset: 0,
      fill: "CPI",
      tip: true
    })
  ]
})

```
