2

I have a map about different locations of amphibians. I want that the colors illustrates the specific species and the form illustrates the stadium (young, adult). I know how to give different colors according to the species, but I didn't managed to also add different forms.

The problem is similar to the following one Setting symbology type and color based on data using QGIS but the answer there didn't helped me. I think it works by using rule based symbology, but I didn't managed to find out how I have to set my rules.

1
  • When creating rules, you may refine those, e.g. based on categories. The corresponding button is at the bottom left, below the plus and minus symbols.
    – Erik
    Sep 9 '20 at 14:33
3

Try this expression

CASE
   WHEN "id" IN (1,2,3,4,5) THEN 'circle'
   WHEN "id" IN (6,7,8,9,10) THEN 'square'
   ELSE 'triangle'
END

in the "Expression String Builder", see image below

example

Note: When hovering at each symbol you can see the default name of it.

For colours check this thread Multiple styles in one layer in QGIS.

5
  • 1
    Thank you very much it worked out. But now I have the problem that I want to create a map and when I add the legend it only adds the layer as one and not the single expressions (e.g. Square = Frog). Do you got a solution for this problem? Sep 10 '20 at 12:00
  • This is a small disadvantage of this approach =)
    – Taras
    Sep 10 '20 at 12:05
  • So its not possbile? Do you maybe know a diffrent approach where it is also possible to generate legend entries? Sep 10 '20 at 12:09
  • I suggest you asking it as a new question
    – Taras
    Sep 10 '20 at 12:13
  • 1
    Alright I will do that, thanks alot for your help! Sep 10 '20 at 12:15

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.