<div dir="ltr">@ Fred: thank you for the workaround you have suggested, but i need something "clean" as my project is so much "crowdy" as it is now, duplicating layers or breaking them by attribute is something i would keep as last resource...<div><br></div><div>@ Tom: this is what i was looking for, i'm not familiar with this kind of expressions (is it SQL?) and surely next versions of qgis need some GUI for this function, even if probably the expression thing grants more flexibility. anyway, how do you know what the program "expects" after the "THEN"? what is the correct argument for bold, or italics, or a different font color?</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-20 3:20 GMT+02:00 Tom Lennon <span dir="ltr"><<a href="mailto:tolennon@gmail.com" target="_blank">tolennon@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Lucas:</div><div class="gmail_default" style="font-size:small">You can use the "data defined override" to set the text size based on your classes.</div><div class="gmail_default" style="font-size:small">Use the fancy "E" under Layer Properties > labels > size.</div><div class="gmail_default" style="font-size:small">The program expects a number which will become the size.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If the class in your data base is called "class" and it happens to be a number usable as the text size just put "class" in the override.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">If "class" is a ranking number ( like 1 - 6, with 1 being the largest population and 6 the least) then enter 13 - "class" in the override to get 7 for least and 12 for largest "class".</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">if "class" is a population number then enter a CASE expression like this:</div><div class="gmail_default" style="font-size:small"><div class="gmail_default">CASE</div><div class="gmail_default">WHEN  "class" > 1000000 THEN  12</div><div class="gmail_default">WHEN  "class" > 750000 AND  "class" < 1000000 THEN  11</div><div class="gmail_default">WHEN  "class" > 500000 AND  "class" < 750000   THEN  10</div><div class="gmail_default">WHEN  "class" > 250000 AND  "class" < 500000   THEN  9</div><div class="gmail_default">WHEN  "class" > 100000 AND  "class" < 250000   THEN  8</div><div class="gmail_default">ELSE     7</div><div class="gmail_default">END</div><div class="gmail_default"><br></div><div class="gmail_default">The overrides can be used to also change font or type style based on data values as well.</div><div class="gmail_default"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Jun 19, 2015 at 5:52 PM, Fred Lali <span dir="ltr"><<a href="mailto:lalifred@gmail.com" target="_blank">lalifred@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div><div><div style="font-family:Calibri,sans-serif;font-size:11pt">Lucas, just copy the same layer and paste in the same canvas n the label them with different fonts!<br><br><br><br>For God and My Country<br>Consultant in: GIS,Forestry and Environment @ Earth Consult(U) Ltd.<br>CCRP GIS Support-Uganda<br>(The MCKNIGHT Foundation)<br><br>Rotarian at RC. Bweyogerere Namboole<br>Mob: 0772/0752-841118<br>Sent from Lumia Windows phone </div></div><div dir="ltr"><hr><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">From: </span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:luca.galuppini@gmail.com" target="_blank">Luca Galuppini</a></span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Sent: </span><span style="font-family:Calibri,sans-serif;font-size:11pt">‎20/‎06/‎2015 00:28</span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">To: </span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a></span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Subject: </span><span style="font-family:Calibri,sans-serif;font-size:11pt">[Qgis-user] labelling by attribute</span><br><br></div><div><div><div dir="ltr"><div><div><div>i'm sorry for posting a lot of newbie questions but tutorials are not so clear about this:<br></div>i have to label a point feature with different font size or style depending on an attribute in the table (for example, i have cities grouped in classes by their importance, and i want the bigger cities to have bigger label size).<br></div>this is really straight forward in arcgis but i really can't find this option in qgis 2.8.2, at least not in a place when one can find it easily.<br></div>i expect i should have something similar to symbol by category, but nothing like that is in the label menu...<br></div>
</div></div></div><br></div></div>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><span class="HOEnZb"><font color="#888888"><br></font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><a href="mailto:tolennon@gmail.com" target="_blank">tolennon@gmail.com</a></div>
</font></span></div>
</blockquote></div><br></div>