[GIS] How to apply a color ramp to a shapefile layer in QGIS 2.8

color ramppopulationqgissymbology

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.

Best Answer

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.

Related Question