[Qgis-user] Accessing using python to the label of a graduated rendering

aperi2007 aperi2007 at gmail.com
Fri Jan 1 02:49:43 PST 2016


Hi,
I resolved it.

It was a my bad coding in other point of the program.

The code

         for range in renderer.ranges():
             theLabel = range.label()

Instead is perfectly working.

Sorry for noise.

Andrea.

Il 01/01/2016 10:14, aperi2007 ha scritto:
> Hi,
> firstly , Happy New Year 2016 to all the QGIS users !!
>
> I need to access to the label of a graduated rendereing using python.
> This is the legend I have:
>
>
>
> To access it I use this kind of code:
>
>         for range in renderer.ranges():
>             theLabel = range.label()
>
> But I dont retrieve the values of the various labels (example: "<= 
> 50.0", or "50.0 - 200.0")
> but instead i have the string "DP39-2001".
>
> AFAIK "DP39-2001" should be the name of the layer , I don't understand 
> why it is accessible in the range.label().
>
> I'm wrong something ?
>
> I'm using QGIS-dev.
>
> Thx,
>
> Andrea Peri.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160101/f0661d1d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 4771 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20160101/f0661d1d/attachment.gif>


More information about the Qgis-user mailing list