Relative Content

Tag Archive for pythonqgispyqgis

Applying style to raster layer with pyqgis – style panel and toc issues

I’m trying to apply a custom colour ramp to a single band QgsRasterLayer using PyQGIS. The colour ramp comes from matplotlib. For the map-canvas this works fine. However, in the TOC the values reach from 0 to 255 (rather than the actual min/max values), though the colour ramp seems correct (for the tiny range). In the style panel it shows the last colour ramp I used (even after restarting QGIS). Is it possible to update these correctly?