If your gird for numerotation are related to a CRS existing you can use gird tool. It could be used with any other project easily and will start numeration at 1 automatically.
The goal is to use the gird tool and not show real coordinates but coordinates modified to be adapted to your map.
- In the layout, select your map, go to item property then Girds and add two gird with the
+
button : bottom axis
and left axis
- Select
left axis gird
and Modify gird ...
- Enable gird, select frame and annotation only as gird type and choose the CRS that is aligned to your light grey gird.
- Set the interval in Y to correspond of the interval you use for your gird in grey multiplicated by 5 to get only the 5-multiple. (I have choosen 1000 for my example with a meter as unit). Select the option
No Frame
as Frame style.
- Check the box draw coordinates and set
left
to be show latitude Y only
inside the frame and all the other border to be disabled
.
It should begin to appear in your map and may look like this: .
Now the goal is to change coordinate to get number between 0 and 20.
- In appearance, set the Y offset to be data driven by expression :
y_max(@map_extent)
- In draw coordinate, use the format
custom
and set the expression to be
(y_max(@map_extent) - @grid_number) /1000
. Change 1000 to be the size of your grey gird.
The result should look like this.
If i did understand well it should work for what you want to do.
You can adapt the Y interval value to be what you want. If you don't want the 0 to appear you can add an if formula to hide zero.
You have to do it the same way for your X axis with x_min(@map_extent)
for offset and (@grid_number - x_min(@map_extent)) /1000
for coordinate expression.