2

If I had a set of data in QGIS that was gradually shading a state or district the exact way I wanted -- but I also need to portray more information about that state or district with additional colors, is that possible to do using colored borders? If so, can somebody walk me through that? And if not, has anybody else thought of another way to represent multiple things about one location?

I guess the ideal would be something like shading the state lame yellow to bright yellow pending on how high their statistic was -- and if the state was Democratic-controlled, put a blue border around it, and if it was Republican-controlled, put a red border around it. Something like that.

Any suggestions? Thanks!

--

*Edit: I think I've potentially figured it out by adding another layer and creating my own border-only style and classify one as Democrat (blue) and one as Republican (red). If the polygon fills are 100% transparent and this layer was on top of the other one, I'd imagine that this should work, right? But every time I get to hitting "ok" to where the map should change to reflect the new borders, it always loads forever to the point where I have to 'Force Quit.'

Any thoughts on that? Thanks again!

1 Answer 1

1

You can do it like you said, by repeating a layer to represent the states borders acording to their political "tendency", using no brush in the polygons filling. Or, you can use a more elegant feature QGIS has for that purpose, called rule-based symbology.

  • In your Layer properpies > Symbology, choose to symbol your layer with rule-based;
  • Right-click the default "no filter" symbol and choose refine current rule > add ranges;
  • Choose your "statistic" field column, the number of classes, the classes mode and the color ramp for your "statistic filed", and press OK;

If everything was done well, as you press apply (or OK), you should have your layer with graduated colors representing the "statistical" values you wanted.

  • Go back to your layer Properties > Symbology;
  • Right-click the "no filter" again and choose refine current rule > add categories to rule;
  • Choose your "political tendency" field column, press classify, and for each of the to options, set a different symbol with no brush fill;

You should now have the result that you wanted, in one single layer. If by any chance the border representation of the states is somehow below the statistic representation, in the symbology tab, press "rendering order...", and change the rendering order for the filter layers, smaller numbers will draw first, so make sure that "politycal" filter have higher numbers than the "statistic" ones.

Hope it helps!

2
  • 1
    Thanks! It's definitely helpful to have it all in the same layer -- and I don't know if I missed this in your description or not, but the way I did it was created a new 'style' which was just a border, then categorized the colors based on that. Do you know why it takes forever to load when I use it?
    – Ryan
    Mar 25, 2013 at 16:52
  • Not really... It must be something related to your data, since I had no problems with it, and you already had problems before. The problem seams to start when you query the "political" field, right? Mar 25, 2013 at 16:59

Your Answer

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

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