I have a GML layer representing an hexagonal grid that I would like to include in some maps. In QGIS (version 2.14.2) I applied a graduated style and completely removed the polygon border:

enter image description here

However, in the map canvas the borders are still being portrayed:

enter image description here

Zooming in one can see the border around each polygon, it is thin, but it is still there:

enter image description here

Suspecting this was an issue with the map canvas itself, I tried to produce some maps with the Print Composer. Even in vector format the polygon borders are portrayed. Please check these files:

Is there any way to force QGIS to remove these borders?


The only way to that is to set the border color same as the fill color, then the border will disappear. You can keep setting the border line width is zero. Use 'Pick Color' to select exactly the same color from fill color.

enter image description here

enter image description here

enter image description here

Use Pick color to make the border color same as the filled color by selecting the filled color

enter image description here

The legend will look like this

enter image description here

And the final output is like this.

enter image description here

  • Like that I get a red border around each polygon. Which QGis version are you using? May 20 '16 at 8:57
  • 1
    You need to select the same color for each filled color. For example red fill -> red border, Blue filled -> blue border, and so on. That is why you need to use Pick color tool under the border color to pick the same filled color.
    – ahmadhanb
    May 20 '16 at 9:24
  • I spent the last 20 minutes modifying each and every class style and the result is exactly the same. May 20 '16 at 9:53
  • I updated the answer for more information.
    – ahmadhanb
    May 20 '16 at 10:03
  • 1
    The reason it hasn't worked for you is because you still have your border style set to "No Pen", so any changes you've done won't show. Change it to "Solid Line" and you should see the difference Jun 1 '16 at 10:35


Tired of creating choropleths by hand for QGis I decided to create a little code package for the purpose. It has the suggestive name choropleth-gen and can be installed from PyPi, issuing a command like:

pip install choropleth-gen

The package installs two scripts in the system: gen_greyscale_choropleth and gen_spectral_choropleth. Both these scripts take the same arguments, identified with specific flags:

  • -b - bottom value in the choropleth.
  • -t - top value in the choropleth.
  • -c - number of colour classes to generate.
  • -o - path to the resulting SLD file.


gen_spectral_choropleth -b 10 -t 50 -c 20 -o style.sld

  • Luis, just wanted to thank you for your script. Used it today, and it was very helpful!
    – Matt
    Aug 30 '19 at 19:35
  • 1
    While nice, this really has nothing to do with the question about QGIS and really should not be the accepted answer. Nov 25 '21 at 11:28

A way of doing this a little faster than @ahmadhanb (if you work with a color ramp for coloring) is to use the assistant by clicking on the symbol on the right and selecting "assistant" enter image description here

In the "source" field you can insert the expression @symbol_color to receive the color that is used for the symbol's filling.

If you need other coloring schemes, you can insert this or other rules:

WHEN "FieldNameYouUseForColoring"<200 THEN 0
WHEN "FieldNameYouUseForColoring"<400 THEN 1
WHEN "FieldNameYouUseForColoring"<600 THEN 2

Next, restrict the range to (0,2) and select the color ramp you would like to select.

  • 3
    You can use @symbol_color as expression, that will use the main color of the symbol. That way you do not need additional rules. Nov 25 '21 at 11:29

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.