I would like to label my grids in QGIS. I know the Printing Layout option presented i.e. here


but yet as the layer. I want them as presented in the image below:

enter image description here

I found some hints here:

Adding labels to grid lines in QGIS

but they didn't helped me.

I would like to know what placement or rendering options should be applied for this purpose.

1 Answer 1


You can do this:

  1. Set up a rule based label with two rules. As filter set for the first one: x_min($geometry) = x_min(layer_property(@layer,'extent')) and for the second one: y_max($geometry) =y_max(layer_property(@layer,'extent'))
  2. Set up a custom Placement -> Geometry Generator. Enter this expression for the first rule: make_point(x_min($geometry)-bounds_width($geometry)/2,y($geometry)) and this for the second rule: make_point(x($geometry),y_max($geometry)+bounds_width($geometry)/2)
  3. Result: enter image description here
  4. A settings-example: enter image description here

Adjust the placement if needed a little.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.