TransWikia.com

Stop layer from showing up in legend on composer

Geographic Information Systems Asked by MortenSickel on February 2, 2021

When I add a legend in a map composer in QGIS, all layers that are defined in the project will be shown in the legend, no matter if they are set to be displayed or not, I also have some background maps I would like to never show up in the legend.

So:
1) Is there a way to tell Qgis not to list layers that are not displayed in the legend?
2) Is there any way to tell Qgis to never list a layer in a legend?

(In my case, I would like to never ever show the background layers or the non-displayed layers the legend)

(using Qgis 3, but have had the same issue for quite a few 2.x versions as well)

3 Answers

Regarding question 2: You could use "Filter legend by map content" to get only those layers which are set as visible. See https://gis.stackexchange.com/a/294288

Answered by mouwsy on February 2, 2021

In QGIS 2.x you can remove layers from the legend in the print composer.

  1. Add legend to the print composer
  2. Select the legend in print composer
  3. In the item properties uncheck the Auto update checkbox
  4. You can customize legend, "-" to remove layer from legend. enter image description here

Answered by Zoltan on February 2, 2021

In the print composer, you are able to control the contents of the legend by turning off the Auto Update. (The Checkbox in the upper left hand corner of the legend control window above the layer list)

enter image description here

Then after that box is unchecked Click on the Blue Funnel to instruct the print composer to only display the currently displayed layers.

enter image description here

You can then use the "-" button to hide other layers of your choosing.

I have highlighted the Background image here with the palette.

enter image description here

I then click on the "-" button beneath the layer list to remove that layer from the legend.

enter image description here

That is how it works for me.

Answered by jbgramm on February 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP