Monthly Archives: August 2015

QGIS Legend trick – polygon shapes

Whilst doing some work on a plan which involved many layers of information, actually I was trying to replicate the plan created in another mapping system, and part of this process involved making it look exactly like the original as it was part of the planning process documents already accepted and therefore, couldn’t be changed (I would have liked to do it differently from the original but this wasn’t an option).

Getting all the mp layers looking like they should was no problem because using the styling capabilities of QGIS, being so extensive, this was a breeze!  Many layers were brought in from MapInfo (opening the native TAB format) and then styled by attributes using the categorized classification method.

A number of layers were polygons either squares, circles or triangles and although they looked OK on the map the shapes are not replicated in the legend in composer, they appear as a normal (usually) rectangle symbols.  This was seen to be confusing but I didn’t know how to sort it.  Below is a picture of three basic shapes classified by their attribute:

As you can see, it doesn’t matter what the shape is, the legend shows rectangles – this is not helpful especially if there are other map items with the same colour.


Now look at the legend below: it is using the same map items and colours but the legend shows the shape also.  To do this you need to style the polygons as ‘centroid fill’ and select your marker symbol size accordingly This will show your polygon as the selected shape and reflect this in the legend.  The down-side is that the symbol size in the legend can be very much larger than other, normal rectangle symbols (if you’ve set the symbol size in the map to be quite large) so you have to adjust the marker size in both the map and composer legend to get things looking right.


Below are the settings as an example:


I hope you find this usful.