# How to add grid lines on top of a heatmap in Makie?

**URL:** <https://discourse.julialang.org/t/how-to-add-grid-lines-on-top-of-a-heatmap-in-makie/77578>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [March 8, 2022, 11:38am UTC](https://discourse.julialang.org/t/how-to-add-grid-lines-on-top-of-a-heatmap-in-makie/77578 "2022-03-08T11:38:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [March 8, 2022, 12:16pm UTC](https://discourse.julialang.org/t/how-to-add-grid-lines-on-top-of-a-heatmap-in-makie/77578/2 "2022-03-08T12:16:50Z")

</div>

The grid lines are moved backwards in z a bit so the normal plots are on top of them. You can move the heatmap back so it’s behind them. (Or move them forward)

```julia
f, ax, hm = heatmap(randn(100, 100), colormap = :Blues, colorrange = (-2, 8),
  axis = (;
    aspect = DataAspect(),
    xgridcolor = :black,
    ygridcolor = :black,
    xgridwidth = 2,
    ygridwidth = 2,
    xminorgridcolor = :black,
    yminorgridcolor = :black,
    xminorgridvisible = true,
    yminorgridvisible = true,
    xminorticks = IntervalsBetween(5),
    yminorticks = IntervalsBetween(5),
  ))
translate!(hm, 0, 0, -100)
f

```

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/5/3/5380e4dc182a524524029444a4edc9bf8c7b40bf.png)

---

_[View the full topic](https://discourse.julialang.org/t/how-to-add-grid-lines-on-top-of-a-heatmap-in-makie/77578)._
