5

I am pretty new to QGIS and have a question concerning the visual styling of points based on attribute values.

I've got point data with a few attributes. Now I want to style the displayed points according to several attributes:

  1. point size according to one attribute
  2. point shape according to another attribute
  3. point color according to a third attribute

Is this possible with QGIS? If yes: Howto? All I found yet only allows to style only one point property according to one attribute column (either size OR shape OR color) - but I want to use all 3 styles at once....

If this is not possible: whats a recommended way to get my desired result?

Using QGIS 3.12.3 Bucuresti on Win10

3
  • I guess your way to style according to a column is classification?
    – Erik
    Commented Jun 4, 2020 at 14:52
  • Yes - unless the point size should follow integer values (but I can build classes of values ...)
    – hoppfrosch
    Commented Jun 4, 2020 at 15:00
  • Have a read-up on "data driven values". This allows you to control symbologies based on columns/expressions. Colour and size are no real issue, but controlling the symbol could be annoying - but this could be done using classification. First set columns for colour and size, then do the classification and change the symbols for each class as desired.
    – Erik
    Commented Jun 4, 2020 at 15:08

1 Answer 1

3

This is the layer, without symbology:

enter image description here

And those are the variables of the table:

enter image description here

You have to add the expression in size, color, and shape definition, like this:

enter image description here

First, you have to go to symbology, select a simple market, and select this:

enter image description here

Second, you have to choose, edit:

enter image description here

This will show you the expression builder:

enter image description here

And in the expression builder you have to do this:

For the size is you have a numeric value, you can add, multiply or divide, to get small or high numbers, like this:

distance + 2

For the color, I multiply for 30 in order not to exceed 255, I used the next expresion, :

color_hsv( "vertex_index"*30, 92, 82)

And for the shape, is necessary to see the name of the shape that you want to show, for example:

if (angle < 90,'triangle', 'circle')

Finally, you have this symbology:

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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