I have a GIS table with traffic flows.
The thickness is proportional to the traffic value and I'd like to have a little legend with 3 links proportional to setted value (eg: link1 proportional to 100 vehicles, link2 proportional to 500 vehicles and link3 proportional to 1000 vehicles).
Any suggestions?
I tried to use the "Legend" but it only represents a coloured link with no thickness.
I am using QGIS 1.8 Lisboa on Win7.

  • I use "single symbol" and in advanced setting I set the tickness proportional to the value. – Ale Jul 22 '13 at 11:35

What you need is not yet implemented in QGIS neither in the stable version (1.8) nor in the master (1.9). But you can use a small workaround to solve that.

  • Start by duplicating your layer;
  • In layer "1" use graduated style, choose the number of classes that you want to show in the legend and press classify;
  • Edit both symbols, ranges and labels of your classes to mimic the layer "1" representation;

enter image description here

  • For layer "2" represent it using single style with scale size field connected to your data in advanced settings (like you already did). This will achieve the desired effect in the map canvas.
  • Keep both layer visible;

enter image description here

  • Now, in map composer add a new legend;
  • In legend Items remove layer 1 and edit the name of layer 2;
  • uncheck the auto-update box;

enter image description here

  • Close the map composer, go back to the map canvas and make layer "2" invisible;
  • After this, your map will show the layer "1" representation, and layer "2" legend.

enter image description here

Alexandre Neto

PS: I used QGIS master in the screenshoots because I did not have the stable version installed. The menus are a bit different in 1.8 but I believe this method will work in both versions.

  • It seems a good way to solve it. – Ale Jul 23 '13 at 11:07

You need to use QGIS 1.9 (2.0) - it has functionality that you need. You can set up 'data defined properties' and if you have for a example a field with the width that needed - you assign width property of the style to this field. See the screenshot:

enter image description here

  • 2
    does that create a usable legend yet? – underdark Jul 22 '13 at 14:31

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.