4

Is there a way in QGIS to create a "two-dimensional" color ramp for the graduated symbology; i.e. a color ramp that determines a color based on two different attributes? My situation is that I want to control the hue of the color of a polygon using one attribute and the saturation of the color using another attribute.

3
  • Would it help to be able to bind a field/expression to each colour value? e.g. red, green, blue, alpha.
    – Nathan W
    Jul 8, 2013 at 23:38
  • That would certainly be a good start - of course, more generally it would be nice to have the color be an arbitrary function of the attributes - but is something like what you describe possible in current QGIS releases?
    – ajd
    Jul 9, 2013 at 17:13
  • You can bind the color, rgba, to a field or expression. After 2.0 I plan to allow you to bind to just a single color value.
    – Nathan W
    Jul 9, 2013 at 22:44

1 Answer 1

6

What you're describing should be perfectly possible using the new data-defined properties functionality in QGIS master (soon to be 2.0 release).

Nathan has posted this example of an "alpha by value" map which maps two attributes (unemployment rate and population) to color and alpha using the expression written in the upper right corner.

enter image description here

You can find a blog post describing the procedure at http://nathanw.net/2013/06/27/alpha-by-value-choropleth/

2
  • Yes it's not a simple as it should be but it works for now until we can change it in 2.1.
    – Nathan W
    Jul 8, 2013 at 23:00
  • How can you accomplish this in QGIS 3.x?
    – Kartograaf
    Apr 7, 2020 at 0:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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