Hi<br><br>I&#39;ve got a vector file (shp) with a bunch of points in it. I want to load the points to the canvas with a specific color (not the random color QGIS provides). I&#39;ve tried a couple of tutorials, but the code provided doesn&#39;t change the color.<br>
<br><div style="margin-left: 40px;"><i>mask = QgsVectorLayer(maskPath, &quot;my_mask&quot;, &quot;ogr&quot;)</i><br><i>sy = QgsSymbol( mask.geometryType() )</i><br><i>sy.setFillColor(Qt.red)</i><br><i>    </i><br><i>renderer = QgsSingleSymbolRenderer( mask.geometryType() )</i><br>
<i>renderer.addSymbol( sy )</i><br><i>renderer.updateSymbolAttributes()</i><br><i>    </i><br><i>mask.setRenderer( renderer )</i><br><i>mask.triggerRepaint()</i><br><i>self.iface.legendInterface().refreshLayerSymbology(mask)</i><br>
<br></div>Did I forget anything, or should I do something diffrently?<br><br>Chris<br>