I'm trying to set up style properties of a vector layer using python. I was able to modify the marker properties but I cannot modify those of Simple Marker, like width or color. Here is my code :
layer=iface.activeLayer() # Marker single_symbol_renderer=layer.renderer() symbol=single_symbol_renderer.symbol() symbol.setColor(QColor.fromRgb(255,255,1)) symbol.setSize(4) # Simple Marker marker_symb = QgsSimpleMarkerSymbolLayer() marker_symb.setStrokeColor(QColor(255,255,1)) marker_symb.setStrokeWidth(0.9) layer.subSymbol(marker_symb) layer.triggerRepaint()
Please can you help me ?