Thursday, 27 December 2018

How to add Raster legends in QGIS map composer?


Is there a plugin or method to add legends for raster layers (with a custom colourmap) as an item in the print composer?



Answer



"Colour Scale Bar" is a plugin (QGIS contributed repository) which does this. It only works with discrete interpolation!


Once you have set up a raster layer in the way you like, you save the style (Layer|Properties... then click Save Style) and select the saved .qml file in the plugin dialogue.



The legend is saved as a PNG file, which you can then add as an image in the print composer.


Elevation legend for E/C Africa map]


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...