I am making a series of maps with the QGIS atlas (print layout composer). I want to show a raster layer on several extents. The extents are defined using a vector layer. The vector layer is used as coverage layer
in the atlas configuration
. I also crop my raster based on the vector layer.
However I would like a raster legend using a classification symbology that would be dynamic and change depending on the cropping of the displayed extent. In other words, each extent should have its own legend according to the values of the extent.
As symbology
of my raster I have indicated that the extent statistics should change according to the actual extent. I use the Singleband pseudocolor
as render option. My legend is dynamic when I change the extent in the QGIS project but this is not the case when I change the extent in the atlas. The legend corresponding to the extent in the QGIS project is displayed and not the one that matches the extent displayed in the atlas.
Is it possible to update the extent of the QGIS project (and thereby the legend) according to the extent of each map in the atlas?
I am using QGIS 3.16 but I can use another version if needed. Following diagram illustrates the situation.
And I want my legend to look like this: