table with initial records

initial diagram pies I am using QGIS Zurich 3.12.

I have records for some 35 species. The records (by year), initially, relate to four (point) locations. Two of the points have records for most of the species. The other two points just have a small number.

As can be seen. The records for a species x year can range from 1 - 6000. The four points have total all species by year records that range from 4 - 2000 say. The pies produced do not reflect this disparity in quantities.

It should be possible to scale the size of the pie relative to the records held.

So the pie for point record with small total would be visually smaller than the pie for point record with very many.

Eventually I plan to have a rolling display of the pies charts by selected record years, perhaps using TimeManager plugin.

What might be possible and how might I go about it?

1 Answer 1


Click on the size tab and select a field (or define an expression) that contains the value you want to use for the size of the pies (see last screenshot below).

If you have large discrepancies between smallest and largest circle, you have at least two options:

  1. Use QGIS expressions with scale_exp to reduce the range - to transform an input range exponentially to an output range. If you want to reduce the range from 1 to 6000 to a scale from 1 to 50, you can use scale_exp( number, 1,6000, 1,50,3). See the documentation for details about how to use it.

    enter image description here

  2. Use a mathematical operation to reduce this range. Use e.g. the square root of your values to reduce the size difference between the largest and smallest circle: sqrt(value), where value is the field you use as input. Range from 1 to 6000 is then reduced to 1 to ca. 77.45.

Screenshot: here, for visalization purpose, I just took the id field to scale the size of the pies: enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.