Questions tagged [qgis-print-layout-legend]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

Generating discrete legend labels instead of default maximum and minimum label on single bar - QGIS 3.18 to 3.22

Question: I used a python script in QGIS 3.16 to generate a raster and subsequently a print layout with legends. I am trying to use the same script to build the print layout in QGIS 3.22. However, ...
1 vote
2 answers

Filtering legend by Attribute in print composer

I have a map layer with two fields in the attribute table: "name" and "Type". I want to print a map with all variations of "Type" marked on it, but filter the Legend by ...
2 votes
1 answer

Adding a custom legend to my layout using PyQGIS

I am creating a layout with two maps, several boxes, picture, ... The problem turn up when I add a legend where I modified the layers. For that I create a list with layers in my map, after that, I ...
1 vote
1 answer

Removing all legend entries except one in LayoutItemLegend using PyQGIS

For my QGIS Plugin want to remove all legend entries in my layoutItemLegend exept one entries (chiro_layer). I would like to browse all of my legend entries and delete this one if it does not match ...
2 votes
0 answers

QGIS 3.18.2 Print Composer/Layout map legend vanishes/goes blank when layer/theme is changed

Using the print composer/layout in QGIS 3.18.2 I have the following problem ... Starting point: I had a print layout set up with a map and legend. The map layers were set by 4 themes. The layout used ...
10 votes
2 answers

Removing legend items with PyQGIS without removing the layer

I am trying to generate maps in PDF files by using a pre-defined .qgz layout. I am already able to load layers and adjust color scale, etc. Since the legend is synchronized with the map layers, all ...