<p dir="ltr"><br>
On Nov 4, 2014 10:11 AM, "Martin Dobias" <<a href="mailto:wonder.sk@gmail.com">wonder.sk@gmail.com</a>> wrote:<br>
><br>
> Hi Anita<br>
><br>
> On Fri, Oct 31, 2014 at 12:46 AM, Anita Graser <<a href="mailto:anitagraser@gmx.at">anitagraser@gmx.at</a>> wrote:<br>
> > Hi,<br>
> ><br>
> > Is it possible to write classification scripts for the graduated renderer in<br>
> > Python?<br>
><br>
> Depends what you mean. If you mean to add another method like Equal<br>
> Interval / Quantiles / Natural Breaks - then you would need to write<br>
> them in C++ and add them to the core library (this is not extensible).</p>
<p dir="ltr">Thanks for the clarification Martin. I was hoping this would be extensible using Python.</p>
<p dir="ltr">> But of course you can come up with your own classification algorithm<br>
> and create the graduated renderer easily in a Python script:<br>
><br>
> ranges=[QgsRendererRangeV2(1,100,<br>
> QgsSymbolV2.defaultSymbol(QGis.Point), "1 - 100")]<br>
> r=QgsGraduatedSymbolRendererV2("cat", ranges)<br>
> iface.activeLayer().setRendererV2(r)</p>
<p dir="ltr">I'll probably give this approach a try then.</p>
<p dir="ltr">Best wishes and thanks<br>
Anita<br></p>