2

In QGIS 2.18.13 on Windows 10, I have symbolized a polygon with two layers on top of either other; the bottom layer is a solid fill color, and the top layer is a BDiagonal (hash). The two layers together produce a colored polygon with a hashed overlay in the map.

In the print composer, is there a way to combine the two legend entries that result from these two layers into a single element, such that the symbol for that polygon is shown as a single colored box with the hashing over top of it?

Right now I just have the two separate layers with their separate symbology. I need them combined.

Alternatively, maybe there is a way to produce this same symbology in a single layer on the map prior to the composer, so that this isn't an issue. I just haven't found a way to do this.

2 Answers 2

4

A quick tip for legend organisation problems : I usually use memory layers and organize them as I wish.

  • Add a memory virtual layer (with no geometry)
  • Make the symbology you want
  • activate the memory layer by ticking the box
  • add to print composer

You can create completelly fake layers and add them to the legend object. Very useful when you want to have a firm grip on your legend elements and for customized legends.

Example :

  • First add your real layers :

memory fake layer

  • Then add a memory layer and use "categorized" style for example to create as many category as you like. Here, i added the 2 layers symbology and added a third one out of thin air :) Don(t care about the value column, here it's useless.

memory layer classified

  • Finally add this memory layer to your legend :

add memory layer to legend

You now master your legend !

1
  • Thanks for your response! I figured out a different way to approach this... Jan 16, 2018 at 21:50
4

I figured out a simple way to do this. Just add a Layer Symbol from within the Single Symbol Layer Styling dialog.

enter image description here

This wasn't obvious before, but is exactly what I needed!

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.