Updated to show more current screenshot and clarified the question (Which tools? What are the steps?)

I'm learning QGIS (1.8 "Lisboa" for Mac).

On the QGIS Layer labeling Settings window there is a section called "Data defined settings":

enter image description here

I believe the user's guide briefly describes its purpose:

The advanced entries inside the Label tab allow you control the appearance of the labels using attributes stored in the layer. The entries beginning with Data defined allow you to set all the parameters for the labels using fields in the layer.

But there are no instructions for using the Data defined entries and the Help file doesn't mention them at all.

For example, I want the label color to be white for the darkest polygon colors in a choropleth map. Will the Data defined settings help me do this in QGIS? If so, how? (Cartographica, for example, allows a user to easily set individual label colors for each category in a choropleth scheme. I was expecting a similar function in QGIS.)

One commenter suggested using the "Expression based label" tool. I don't know how to access the tool and there don't appear to be instructions in the user's guide. It isn't clear to me whether "Expression based labeling" supersedes "Data defined settings" or is meant to be used in conjunction with them.

I'm in need of clear, step-by-step instructions.

  • One place to start:nathanw.net/2011/10/27/expression-based-labeling. I'm also looking for a more comprehensive index expressions. I selected my labels by using a field in my attributes table. You may be able to link your polygons color attribute to your labels color attribute through a logical expression.
    – Fred
    Commented Mar 5, 2013 at 15:48
  • Thanks for the link. I'm hoping someone can offer some insight into QGIS's built in labeling tools. I am already using a field in my attributes table to create my labels, but I want to customize them. It isn't clear to me whether the "Advanced" settings will help me do this.
    – syncrasy
    Commented Mar 5, 2013 at 17:10
  • Sorry I wasn't clear. I'm new to this too. QGIS has two separate methods of styling labels. If you select the ABC button in the toolbar, it has a much more advanced system (and I believe the only one which will be supported in newer versions). This is the xpression based labeling system I'm speaking of. More tips on it's use below. gis.stackexchange.com/questions/22896/… gis.stackexchange.com/questions/41478/…
    – Fred
    Commented Mar 5, 2013 at 17:34
  • No worries. You helped solve another bug problem I was having by using the old labeling system. (Why QGIS would add a new labeling system but keep an old buggy labeling system makes no sense to me.) But I'm now even more confused about how to use these tools. Without clear step-by-step instructions, I struggle greatly.
    – syncrasy
    Commented Mar 5, 2013 at 18:03

1 Answer 1


The usage of data-defined labeling is described in detail in the accepted answer to What are valid values for "data defined" labeling settings?

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