 Hello, this is Hans van der Klaas Senior Lecturer at IHG Dolft Institute for Water Education. From QGIS 3.18 you can more easily add raster legends to the print layout. To demonstrate this I am going to use a project that I used in a previous video to explain the legend patches, a project with the raw catchment and QGIS gives a warning that the project file is older, but that's not a problem and I can open the print layout that I made for that previous video. Here's the print layout with the legend patches and let's zoom in a bit to place our legend for the DEM. So as usual I just click the add legend button to add the legend and then I switch off auto update to be able to make changes here to the legend and I'm going to only use the DEM here because the other parts are already under the map. I remove the whole group there. So there's my raster legend, if I double click on the legend you can add some settings here. So I will specify the width, 5mm and the height 50mm and I want also that the meters in the legend are specified as a suffix so I add a space and an M and you see now that the meters are there. Let's change a few other settings to make it nicer to look at some of the features. So in this case in our map our low areas are on the top so it's a bit more intuitive to make the low values at the top. Let's remove here some of the text that we don't need and let's add it the label and call it elevation. Now it already looks great but we have this white background that we want to remove so I scroll down and I uncheck the box for a background. If you don't want a vertical legend but a horizontal one that's also possible. Let's double click on the legend and then if we scroll down we can choose here for orientation horizontal and we see that it's changed but now we also need to change the dimension so let's swap it 50mm width and 5mm height and I want then the maximum on the right it looks a bit better here and then of course a bit big to find a good position but you can put it where that makes more sense. Now to demonstrate that it adjusts for the minimum and maximum values I change the minimum value to 100 so the colors are stretched in a different way and I go back and if I do refresh it is not automatically adapted and that is because the auto update is switched off so you need to switch it on and then it will adjust but then I also get those other items back again so I need to remove those and apply the settings again and there's a final map.