Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a large geology data set that I need to display using an industry standard set of symbols and colours. The symbols and colours are attributes of the data. I have been using the data defined symbols capability of the dev build of QGIS (code revision b805894) to display the data according to its attributes. This works perfectly in terms of displaying the data correctly in the map window.

The problem arises when I try to create a legend in the composer. The data-defined colours displayed on the map don't pull through to the legend.

Here are some screens shots. The first shows the map window. You can see the problem manifesting in the Layers box on the left. The symbols are all coloured black.

The second screen shot shows the composer window with a legend.

enter image description here

enter image description here

Thanks in advance

share|improve this question
just upload your screens to imgur or similar and post the link. Edit your post to add the pictures. Furthermore: Which QGIS-Version are you using (as the composer has gone through many changes in the current QGIS master)? –  Curlew Jun 17 '13 at 16:15

2 Answers 2

I think legends for data-defined symbology are not implemented yet. I've opened a bug report/feature request:

Thinking about it, data-defined symbology is extremely powerful and might result in hundreds of different variations of a symbol in color, shape, size, rotation, and so on. It might be unfeasible to really have a legend in such a case.

share|improve this answer
Thanks for the reply, and for opening the feature request. Data defined symbology is a fantastic tool, however in my mind it would be severely limited if it was unable to be used in the production of professional maps. –  Kris Jun 21 '13 at 8:08

I'm not sure it can be of any use for complex cases, but I manage to get a fake legend by adding a shape layer.

I then created points in the new layer with the same kind of data than used to defined the symbology, and located where I wanted the legend to appear. Then I defined the same symbology for this layer, and showed the corresponding data values as labels. Hope this might help someone.

share|improve this answer
This "trick" works especially well for graduated circles (or similar) legends! –  Andrew Tice Oct 22 '13 at 3:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.