In QGIS 3.22.8 I have 100s of linear features on a map. I want to label them horizontally, but don't want the label sitting over the line. I can find the Horizontal placement setting, but no offset setting.
Currently, my labels look like this:
How can I shift these labels to the right so the text starts next to the line feature? I'm not keen to use workarounds, such as padding the label text with a load of white space before the text.
My label settings:
Best Answer
Use a label placement based on Geometry Generator: create a (small) buffer around the lines and use placement Outside Polygons.
How to do:
In Placement settings, set the
Mode
to Outside Polygons, then check the box next toGeoemtry Generator
and add this expression:buffer($geometry, 0.6)
and below select Polygon/MultiPolygon. Change the size of0.6
to fit your needs.