Thursday, 17 May 2018

How to remove selected elements from a QGIS legend?


I'm working with a QGIS project with a number of layers. When assembling a printout all visible layers are automatically added to the legend:


1st legend


I would like to exercise some control over the legend elements are remove some of the entries:



2nd legend


However, as the entries correspond to the upper levels in the hierarchy, deleting them will remove the keys:



1 - 20000
20000 - 40000
...





I'm working in Qgis 2.8. I'm not interested in modifying my layer structure but only in changing the legend elements.



Answer




Instead of deleting legend items, you could hide them. From the Legend items options window, right-click the name of the layer and select the Hidden option:


Hide layer names


This would hide the names of layers, leaving the values:


Result


Hope this helps!


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...