I am a newbie working on QGIS 3.6 / Windows 10. I need to label a polygon layer which is categorised by colour. (pls refer to attached pic as a graphical reference)
The labels need to have a background which is also categorised by colour (red, orange, yellow and white) according to values in the attribute table of the shapefile.
My understanding is that the map as pictured has been created with an older version of ArcView...
Is it even possible to achieve something similar in QGIS?
Answer
In the attribute table of your polygon, you will have a field which dictates the polygon colour, another which dictates the label colour, and another which dictates the label text. I've made a quick example below.
You can set the layer symbology to 'Categorized' based on your polygon colour field.
And set you labels to 'Rule-based labelling'. You'll need to set rules as required for your dataset, my example rules follow the format "Label colour" = 'yellow' etc.
Example output below.




No comments:
Post a Comment