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 WCommented 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?– ajdCommented 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 WCommented Jul 9, 2013 at 22:44
1 Answer
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.
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 WCommented Jul 8, 2013 at 23:00
-