On Nov 4, 2014 10:11 AM, "Martin Dobias" <[email protected]> wrote:
>
> Hi Anita
>
> On Fri, Oct 31, 2014 at 12:46 AM, Anita Graser <[email protected]> wrote:
> > Hi,
> >
> > Is it possible to write classification scripts for the graduated
renderer in
> > Python?
>
> Depends what you mean. If you mean to add another method like Equal
> Interval / Quantiles / Natural Breaks - then you would need to write
> them in C++ and add them to the core library (this is not extensible).

Thanks for the clarification Martin. I was hoping this would be extensible
using Python.

> But of course you can come up with your own classification algorithm
> and create the graduated renderer easily in a Python script:
>
> ranges=[QgsRendererRangeV2(1,100,
> QgsSymbolV2.defaultSymbol(QGis.Point), "1 - 100")]
> r=QgsGraduatedSymbolRendererV2("cat", ranges)
> iface.activeLayer().setRendererV2(r)

I'll probably give this approach a try then.

Best wishes and thanks
Anita
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to