Sunday 25 October 2015

cartography - Styling border to match fill in QGIS?


In the past I have just manually matched the color of the border to the color of the fill, but this can be time consuming.



I am wondering, is there any way to have the program automatically match the border color to that of the fill?


The fill color is being assigned through the styling tab in layer properties.


Using QGIS 2.8.6



Answer



I'm not sure how to enforce it for existing polygons, but you could make it work for any future ones that you create.


In Project Properties>Default styles>Style Manager, you could create your own default symbol style for "Fill":


QGIS Style Manager


Edit the Border color's expression and set it to @symbol_color: Editing the Border expression


Setting the border expression


Lastly, set your new fill style as the default: Setting new fill as default



This will make the border always match the set symbol color. This won't necessarily be reflected in the polygon's properties though. So it can still look like you have a different color border set in the properties, but it should always actually match the object's set symbol color in the map.


Wish I had a better idea as far as making this retroactive, but perhaps I or someone else will come along with a good idea on that later.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...