I have several columns of data that have percentage values. Some are positive and some are negative. In one particular column, the values range from -0.70 to +0.20. The mean value of the column is around -0.08.

I want to color these features using a divergent color ramp (for example, the Spectral ramp). But the symbology options in QGIS seem to not give me an option where the actual color divergence happens, so I get classifications like these:

Not centered!!!!

Note how the yellow color is arbitrarily centered on -0.1, not 0.

How can I force the central color of the color ramp to be centered on 0?

For example, how can I tell QGIS to do "Pretty breaks", but on a given range instead of the data column itself? Do I have to do this manually?


2 Answers 2


For several classifications like "Pretty breaks", you can manually set a value for Symmetric Classification, see screenshot. As "Pretty breaks" generates "pretty" (round) values, setting an appropriate number of classes is important and probably the value you enter will be rounded. Use other classifications like equal interval.

Screenshot: using equal interval and setting Symmetric Classification around the mean value of -0.39: enter image description here

  • 1
    Sorry this took me so long to see!
    – Felipe D.
    Dec 30, 2021 at 18:25
  • 1
    Better late than never
    – Babel
    Dec 30, 2021 at 19:55

What about setting up and saving your preferred colour ramp as a style file, then applying it sequentially to each column? You can also then apply this to new data sets.

  • 1
    That will likely work, but if I'm working with several columns that have different ranges, I'll have to develop one that goes from -5% to +5%, then another one from -10% to +10%, then another that goes from -20% to +20%, etc. Not to mention that I'll likely have to recode all of it if I want to use a different color pallette (RdYlGr or Spectral or PrGn). It just seems like a huge hassle to get something that should be quite easy and straightforward.
    – Felipe D.
    May 8, 2019 at 20:30

Your Answer

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

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