1
vote
0answers
54 views

How to apply categorized symbols to polygon layer with PyQgis?

I'm fetching a polygon layer from postgres like this: uri = QgsDataSourceURI() uri.setConnection("localhost", "5432", "mydb", "postgres", "xxx") uri.setDataSource("public", "my_table", "geom") lyr = ...
4
votes
1answer
230 views

How change border line to no pen with python console?

From Python console I load a shapefile with qgis.utils.iface.addVectorLayer. How I can remove border lines (change to no pen) in the active layer?
2
votes
1answer
803 views

How to apply a graduated renderer in pyQGIS?

Just trying to run the following code already given in the pyqgis cookbook to create graduated colors symbology (as in example with 2 classes) I define the source info for the shapefile but when I ...