0

In QGIS I have a vector dataset (imported CSV vector + csvt) spanning multiple years, and a shapefile shape which is essentially a grid. By joining the CSV file with the shapefile I can apply a colour to each grid square and hence a gradient scheme for the whole grid. I have created a series of maps - one map per year, each with its own colour gradient. However the colour gradients are not comparable between maps because the range of values is different among years. How can I make the gradient scales standardised across all maps?

I've tried splitting the CSV file into years, and with each year individually, it does not seem possible to create a 'custom' range of values for the gradient, say 0-100, even though the values span say 20-70. I've also tried working with one CSV file containing all years, thinking that I could somehow 'trick' QGIS into applying a gradient that spans the range of the whole dataset, while at the same time only map individual years. Categories doesn't seem to be an option as if I have 200 grid squares I get 200 categories each with own unique value.

Any help would be much appreciated. It may be that there is a database-based solution which I am open to. I am also open to GRASS solutions, but I am less familiar with GRASS as this stage.

2

You can create a custom range of colors using the "rule based rendering" option in the Style tab of the layer properties. Create a set of rules, with the colors you choose (for the whole scale of possible values, 01-00 as you mention). Then save the style out to a QGIS style file (*.qgs).

Now you can load that style for all the other years (the "Load Style" button), and you'll have an identical color ramp for all the years.

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.