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.

  • 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 '13 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 '13 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 '13 at 22:44

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/

  • 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 '13 at 23:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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