I have a map grid (line, shp) that was created with MMQGIS. The X and Y coordinates of the lines are stored in the the attribute table, which makes labelling the lines an easy process.
My problem is with the location of the labels. Currently the labels are in the default position, central. This poses an issue when I want to print a gridded map as the labels are very prominent and obscure information in the center of the map.
I wish to align the labels of horizontal lines to the left margin of the page and labels of vertical lines to the top of the page.
I have seen an identical question asked previously here SHP file Left / Right Label Alignment issue in QGIS 2.0.1-Dufour I have attempted to use the same solution with no success. I am using version 2.14.1 and the coding required to position the labels at the start or end of the line must be different, or I am using the code incorrectly.
I have attached an image as an example of the default. I wish to move the labels to the left for the horizontal lines, and to the top for the vertical lines. If it is possible to offset the labels from the edge of the page that would also be great.
If any more information is needed please let me know.
Edit 01, for clarification:
I have managed to align the labels to the edge of the lines, although this is at a fixed position (see image).
The problem is that if I zoom in on a specific area I cannot see the labels. I would like the labels to follow the screen boundaries if this is at all possible. (It may not be currently) By doing this, it should hopefully automatically add the labels to the edge of a map created in the print composer.
Image 02: Zoomed out image, labels visible.
Image 03: Zoomed in image, labels in fixed location, therefore not visible.