Wednesday, 6 January 2016

cartography - Creating legend with new data defined symbols functionality in QGIS?


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



Answer



Legends for data-defined symbology are not implemented yet. There is an open bug report/feature request: https://issues.qgis.org/issues/11491


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.




Update 2017-08:


QGIS3 will include an automatic legend for data-defined size:



enter image description here


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