Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a QGIS plugin that, after a series of inputs, will produce a thematic map using the QgsGraduatedSymbolRendererV2. Because the polygon are very small, the boarders make it such that when zoomed out the entire map almost looks completely black. I want to remove the boarders to do this but no documentation or form I have found have demonstrated how to do this. Below is what I have to create the thematic map, but somewhere in there I need to set the border style to 'no pen'. But how!?

  uri = QgsDataSourceURI()
  # set host name, port, database name, username and password
  uri.setConnection("localhost", "5432", "public", "postgres", "password")

  uri.setDataSource("susip", str(filename)+"_mce_results", "the_geom")
  layer = QgsVectorLayer(uri.uri(), str(filename)+"_mce_results", "postgres")

  fieldName = "score"
  fieldIndex = layer.fieldNameIndex( columnName )
  provider = layer.dataProvider()
  numberOfClasses = 10
  color1 = QColor("red")  
  color2 = QColor("green")
  color3 = QColor("white")
  ramp = QgsVectorGradientColorRampV2(color1, color2)

  renderer = QgsGraduatedSymbolRendererV2.createRenderer(layer, columnName, numberOfClasses, QgsGraduatedSymbolRendererV2.Quantile, QgsSymbolV2.defaultSymbol(layer.geometryType()), ramp)

  layer.setRendererV2( renderer )
  QgsMapLayerRegistry.instance().addMapLayer( layer )
share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.