[GIS] Style points using color gradients with QGIS

colormapqgis

I need to style a shapefile with a specific color gradient, but considering absolute values.
It's point shapefile with values between 0.19 and 0.70 (considering they're in an absolute scale between -1 and 1).

I'm using QGIS 2.14.3.

I've build a color map using Matlab (.svg format based on the cpt-city) but the problem is that the color steps inside the .svg file are divided with percentages.
I can't give the exact value the style/color I need, unless I do that manually, one by one.

I did the trick when using raster data: I've build color ramp with the exact steps and the correspondent color.

Best Answer

You can use SVG2ColoR plugin.

(1) Start the SVG2ColoR plugin and read your .svg file from Matlab. I did not have such a sample, so I visited cpt-city and obtained rainbow color (just because it has plenty ~ 239 colors!) by Get URL.

enter image description here

(2) Then I clicked on Import which imports color into QGIS. In QGIS raster layer properties, I colored a dummy raster (its Min and Max values are quite important, though). Classes set to 50 (colors).

enter image description here

(3) Then I save my 50-colors rainbow as new style (.qml) file by Style -> Save Style.

(4) I have new qml file which defines 50 colors, each color corresponds to discrete values.

enter image description here

I used QGIS 2.18, but this plugin was first published in 2014. Should work for QGIS 2.14, too.