2

How can I apply a color ramp to a shapefile layer to show something simple like population variance? If this was ArcGIS, I would do it by using the Quantities tab in Symbology but I have been unable to find an equivalent in QGIS. Do I have to use Python? If so, can someone point me to a good script for color ramps?

I'm using QGIS 2.8 on a Mac.

1
  • 2
    Right-click your layer > Layer Properties > Style > Change Single Symbol from the drop-down list to another such as Categorized or Graduated to add/change colour ramps etc.
    – Joseph
    Jun 18 '15 at 12:39
3

As the comment above said; you need to open the properties of your layer (either double click it or right click it and choose properties), go to Style tab, and change from Single Symbol to Graduated. Then you choose the attribute you want to use in the drop down, choose a colour gradient and press Classify.

However, if your attribute is the wrong data type (ie. numbers in a text column) you need to write a small expression in the textbox for the attribute you want to use. If you have a floating number with decimals, you write:

toreal( "my_column_name" )

If you have a column with integers, you write:

toint( "my_column_name" )

Please note that this still wont catch things like numbers formatted for easy reading (such as 76000 formatted as 76 000). To solve that you need to properly format the whole column as a proper number datatype column.

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.