2

I have offset some data points in QGIS but I want my points to stay aligned in the legend? It looks funny when points aren't lined up. Anyway I can do this?

enter image description here

  • 1
    can you post a screen capture of the issue? – DPSSpatial Mar 2 at 16:15
  • Which QGIS version are you using? – Val P Mar 2 at 16:43
  • This is a guess, but is there an X offset on the symbols? – Gabriel C. Mar 2 at 17:23
1

One workaround is to use a geometry generator style.

Under the Marker symbology, change Symbol layer type to 'Geometry generator', select Point/Multipoint as the Geometry type, then paste in an expression like translate($geometry, 0.2, -0.2) to offset the point (change the numeric values as needed, these are X and Y offsets in the CRS of the layer), then style the marker for that point appropriately.

enter image description here

However, a big caveat is that you can only offset using map units, not millimeters etc. - which is a pain if you're using a geographic coordinate system (like EPSG:4326 - you might need to convert the point geometry to a projected system)

Also a pain if you want it to offset a similar amount at different scales. You would have to play around based on the map scale you want - in the above I've used 0.2 and -0.2 in metres to approximate a 2mm X/Y offset at 1:100 in a local projected coordinate system... but it's again different at 1:50 - see below.

The marker appears properly in the legend, at least, so if you know what scale you want it at, you can fix the values and only have it display at that particular scale?

enter image description here

| improve this answer | |
0

When I have some funky symbology like this I usually create a folder in my table of contents called "Legend Layers", in that I create duplicates of my layers which have symbology that doesn't look good in the legend. I use these duplicates to change the symbology to something that looks good in the legend and then I add those to the legend instead of the original layers.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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