I am using PyQGIS.
In QGIS1, I can use:
rlayer.setDrawingStyle ( QgsRasterLayer.PalettedColor )
but In QGIS2, I got some errors.
I follow pyqgis developer cookbook, put some demo scripts in qgis python console without success.
rlayer.drawingStyle() #got AttributeError
rlayer.setDrawingStyle(QgsRasterLayer.SingleBandPseudoColor)
#got AttributeError from QgsRasterLayer, change it to QgsRaster
rlayer.setDrawingStyle(QgsRaster.SingleBandPseudoColor) #got TypeError