I know QGIS has a feature to make labels size dependant from an attribute:
The problem is that I don't know how to choose a maximum size or even a size variation-scale. It makes the size proportional to the values of the chosen attribute, which sometimes makes the lables too big (or too little):
I've tried to use the "expression" labeling (for example using logarithms), but I don't know how to make the maximum and minimum be less "extreme".
Is there a way (maybe through an expression) to make the size of the labels more visual-friendly? Something to make those labels "less proportional" to the attribute.
Answer
I think i've found a solution trying random functions and expressions. There is a function called "scale_linear" that allows to make a linear dependency.
I put the field name in the "input domain" and define a domain-range between the minimum and maximum value of my attribute (in my case 0.1% and 15.1%) then I put the output range (label size) I want as a minimum and maximum (in my example 5mm and 8mm).
So this is what happens:
The function assigns a size of x[5; 8] to an attribute y[0; 15], in a linear way. So:
0 % = 5 mm
15 % = 8 mm
And the result is:
No comments:
Post a Comment